[ ArgumentList ] vs. @( ArgumentList )

Simen Kjaeraas simen.kjaras at gmail.com
Tue Nov 6 12:03:57 PST 2012


On 2012-11-06, 20:55, Faux Amis wrote:

> On 06/11/2012 20:18, Walter Bright wrote:
>> For User Defined Attributes.
>>
>> In the north corner we have the current champeeeeon:
>>
>> -------
>> [ ArgumentList ]
>>
>> Pros:
>>      precedent with C#
>>      looks nice
>>
>> Cons:
>>      not so greppable
>>      parsing ambiguity with [array literal].func();
>>
>> ------
>> In the south corner, there's the chaaaaallenger:
>>
>> @( ArgumentList )
>>
>> Pros:
>>      looks like existing @attribute syntax
>>      no parsing problems
>>
>> Cons:
>>      not as nice looking
>> ------
>>
>> No hitting below the belt! Let the games begin!
>
> With [] I expect array operations; can I slice it?
>

Of course. It's a typetuple.

-- 
Simen


More information about the Digitalmars-d mailing list