[ ArgumentList ] vs. @( ArgumentList )
Paulo Pinto
pjmlp at progtools.org
Wed Nov 7 09:08:54 PST 2012
Am 06.11.2012 20:52, schrieb Manu:
> I'd like to re-enforce the consideration that @attribute() makes it
> looks like they affect the code generation somehow... they're really
> just annotations.
>
>
> On 6 November 2012 21:47, Jacob Carlborg <doob at me.com
> <mailto:doob at me.com>> wrote:
>
> On 2012-11-06 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!
>
>
> I vote for @( ArgumentList ). If this is syntax chosen I also hope
> @attribute will be legal as well.
>
> --
> /Jacob Carlborg
>
>
Speaking from C# point of view, the same argument can be used, because
in .NET [] attributes might change the way the code gets generated.
Some of them like are even reckognized by the JIT/NGEN.
--
Paulo
More information about the Digitalmars-d
mailing list