[ ArgumentList ] vs. @( ArgumentList )

Benjamin Thaut code at benjamin-thaut.de
Tue Nov 6 11:36:04 PST 2012


Am 06.11.2012 20:18, schrieb Walter Bright:
> 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!

I think @( ArgumentList ) would be more consistent with what D already 
has, but my vot still goes for [ ArgumentList ] because personally I 
find that @'s make the code look "ugly". There are other languages where 
the '@' is only used for language features you shouldn't be using a lot.

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list