[ ArgumentList ] vs. @( ArgumentList )
Damian
damianroyday at gmail.com
Tue Nov 6 11:51:19 PST 2012
On Tuesday, 6 November 2012 at 19:18:39 UTC, 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!
At first I liked the C# style, but it just does not mix well
with D's system attributes. So my vote is for..
@( ArgumentList )
I would prefer if I could enclose system and user attributes in
the parenthesis, with no idea how that would work though.
More information about the Digitalmars-d
mailing list