Custom attributes (again)

Adam D. Ruppe destructionator at gmail.com
Thu Apr 5 07:47:42 PDT 2012


On Thursday, 5 April 2012 at 13:23:44 UTC, Manu wrote:
>> http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6
>
> Wow, August 2009. Interesting that it tends to be so 
> controversial in that case :)

DIP 6 sucks. It has been fully implemented for some time,
but it was written to be useless:

"Also at this first stage, a user cannot define new annotations.
A user cannot inspect annotations."

It gets worse:

"Annotations will allow several things: reduce the amount of 
keywords and extend the language more easily.
[...]
The language can be extended more easily just by adding new 
annotation names instead of new keywords: new keywords might 
render old code not compilable, while with new annotations that 
can never happen.
[...]
Annotations could be used for several things now."


This proposal has a few major flaws in the design:


1) it is useless. Doesn't include inspection.

2) The rationale was to "reduce keywords", which opened
the door for a strange old/new split. Is it pure or @pure?
property or @property? The question is if it was introduced
before or after DIP6 was implemented rather than anything else.

3) The idea of applying it to things now instead of a new
concept led to a pretty lame implementation.


It mentions being a step toward real annoations, but
in practice, it was a step in the wrong direction.


More information about the Digitalmars-d mailing list