[ ArgumentList ] vs. @( ArgumentList )

Matt Soucy msoucy at csh.rit.edu
Tue Nov 6 12:48:55 PST 2012


On 11/06/2012 02:18 PM, 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!

One more vote for @( ArgumentList ) with optional () for simple ones - 
they seem like they would fit with the rest of the language much more nicely


More information about the Digitalmars-d mailing list