11/7/2012 5:40 PM, deadalnix пишет:
[snip]
[], because @ should be reserved for future language keywords.
Whenever people post suggested language features that require some
marking, they introduce a new @attribute, because introducing a plain
keyword breaks code. If you have @UDAs, this further limits language
expansion.
Example: let's say you want to introduce a "nogc" mark:
1. Not a nogc keyword, that could break "bool nogc;"
2. If you have @, @nogc could break an "enum nogc;" attribute.
3. Now you're stuck with __nogc or #nogc or something uglier.
There is a familiar-to-other-langauges advantage to @, but there is a
better-than-other-languages advantage to [].
My thoughts,
NMS
I think D has already too many feature, and that many of them can be
implemented as attribute + AST processing.
+1
D should work toward getting this AST stuff and stop adding new keywords
all the time.
--
Dmitry Olshansky