accept @pure @nothrow @return attributes
    via Digitalmars-d 
    digitalmars-d at puremagic.com
       
    Mon Jan 26 07:47:06 PST 2015
    
    
  
On Monday, 26 January 2015 at 15:07:24 UTC, Jonathan M Davis 
wrote:
> On Monday, January 26, 2015 13:21:54 via Digitalmars-d wrote:
> function. So, I
> don't think that that particular distinction would work, even 
> if we could
> freely rearrange which attributes had @ and which didn't.
I personally agree that it would be better to remove "@" like you 
suggested and leave it for UDAs. Interpreting D code is hard for 
tools without a library anyway, so I think the current approach 
is unwarranted, and would rather see a more complicated grammar 
and parser in favour of usability. D could provide an official 
parser/semantic analysis library available for tools (like clang).
The visual noise in D2 is too high IMO, and the reuse of 
keywords/symbols for unrelated functionality makes 
usability/legibility/reading comprehension worse.  I think this 
alone is enough to prevent mainstream adoption.
Other languages compensate by having constructs that allow you do 
use "keywords" for fieldnames in records. It is a better 
strategic move to favour good syntactical usability/legibility 
over parsing complexity. Clean context independent mapping 
between syntax and semantics is important.
Besides, D really needs to allow the use of common nouns like 
"body" in structs (e.g. to implement the HTML DOM)... so a more 
wholesome approach to rethinking the D syntax would be welcome.
The D syntax needs rethinking as a whole, not in bits and pieces. 
If you are gonna break, make it clean, and make the language easy 
to learn.
    
    
More information about the Digitalmars-d
mailing list