[ ArgumentList ] vs. @( ArgumentList )

Dmitry Olshansky dmitry.olsh at gmail.com
Thu Nov 8 09:53:11 PST 2012


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


More information about the Digitalmars-d mailing list