accept @pure @nothrow @return attributes

Jonathan Marler via Digitalmars-d digitalmars-d at puremagic.com
Mon Jan 26 08:10:51 PST 2015


I agree with Jonathan's points, this solution doesn't seem like 
an improvement.   If I understand the problem, we don't want to 
make every attribute use the '@' symbol because it looks bad and 
would cause a lot of code changes for sake of consistency.  
However, on the other hand, we don't want to support the new 
properties because we have to add them as keywords which would 
break code using those words and would make the language more 
restrictive (nothing can be named nogc/safe/...).

Assuming I understand the problem, couldn't we modify the 
language grammar to support more attributes without making them 
keywords?  Then we can omit the '@' on future code (and fix the 
old code if we want) and we don't have to litter the language 
with new keywords.

I understand that doing this may be fairly complicated.  This may 
create some ambiguities in the grammar that would need to be 
handled carefully, but if it can work I think this would be a 
good option.


More information about the Digitalmars-d mailing list