Why do some attributes start with '@' while others done't?

jmh530 via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 22 09:45:15 PST 2016


On Friday, 22 January 2016 at 13:30:40 UTC, Ola Fosheim Grøstad 
wrote:
>
> D is too complex to defend the position that you need 
> _reserved_ keywords. Maybe at some point in the past D1 was 
> simple enough to defend that position.
>
> You write a parser once or twice, so having a clean syntax 
> weigh up for spending a little bit more time on the parser.
>
> What D needs is consistent usage of sigils. It makes code 
> easier to read and easier to write.
>
> What does ":" mean? What does "@" mean? What does "!" mean?
>
> No consistency in D.

I haven't had any difficulty with "!". It's not in some cases and 
for introducing template parameters in others. Never had much 
difficulty figuring out which is which. I had a little more 
difficulty with ":" in that its use in template specialization is 
different from inheritance. Now though I'm sort of used to it. 
Similarly, I'm used to @. The only thing is that it's just so 
obviously inconsistent. It sticks out more than the others.

Anyway, I found Dicebot's post about DIP64 convincing.


More information about the Digitalmars-d mailing list