accept @pure @nothrow @return attributes

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 26 12:08:31 PST 2015


On Mon, 26 Jan 2015 19:46:21 +0000, Meta wrote:

> On Monday, 26 January 2015 at 19:44:18 UTC, Walter Bright wrote:
>> On 1/26/2015 8:13 AM, Foo wrote:
>>> You could do the same as C++ with override and final: they are only
>>> valid attributes if they appear _after_ the function/method. Elsewhere
>>> they are still valid as identifiers for e.g. variables.
>>
>> Just 'no' on context-sensitive tokens.
>>
>> For context,
>>
>>   TV vocabulary - 2,000 words High school vocabulary - 10,000 words
>>   College vocabulary - 30,000 words English - 1,000,000 words
>>
>> i.e. words are NOT a scarce resource (quite unlike punctuation).
> 
> Some words are in high demand, however, like body and match.

body will not be "dekeyworded".

Walter Bright  2014-02-12 14:44:20 UTC 
In hindsight, the choice of 'body' for the keyword is unfortunate. But 
fixing it would cause even worse problems, so I think we're stuck with it.

nobody told us what "worse problems" are. using "body" is not confusing, 
lowering it into identifier will not break any code, but... "worse 
problems" awaits.

i'm using patch that allows "body" as identifier for almost a year, i'm 
constantly building alot of projects from dub repo, and i haven't 
encountered any problems with it. but i believe that i'm simply doing 
something wrong and dragons are around the corner.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150126/d1dc815d/attachment.sig>


More information about the Digitalmars-d mailing list