[ ArgumentList ] vs. @( ArgumentList )

deadalnix deadalnix at gmail.com
Tue Nov 6 11:22:01 PST 2012


Le 06/11/2012 20:18, Walter Bright a écrit :
> 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
>

Look like what is done in Java, python and PHP.

> Cons:
> not as nice looking
> ------
>
> No hitting below the belt! Let the games begin!

BTW, I'm all for @argument @argument @argument rather than @(argumentlist)


More information about the Digitalmars-d mailing list