[ ArgumentList ] vs. @( ArgumentList )

foobar foo at bar.com
Tue Nov 6 13:25:22 PST 2012


On Tuesday, 6 November 2012 at 20:01:27 UTC, Jacob Carlborg wrote:
> On 2012-11-06 20:52, Manu wrote:
>> 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.
>
> I still like the syntax.

I'd also like to add that the OP argument is false.
Sure, the attributes themselves are just meta-data and you can 
use them for purely informative purposes (to annotate with 
documentation, author names, versions, license, etc..) but more 
commonly attributes are intended to be introspected on at CT or 
RT and used to *indirectly cause some processing*.

The end result is the same and user defined attributes should be 
consistent with built-in ones.
Syntax wise, I agree the C# version is /slightly/ more pleasant 
to the eye than the Java one but given the possible grammar 
ambiguities and the consistency with buit-ins, @(attributes) win 
by a landslide.


More information about the Digitalmars-d mailing list