User Defined Attributes

deadalnix deadalnix at gmail.com
Tue Nov 6 08:29:17 PST 2012


Le 06/11/2012 09:20, Sönke Ludwig a écrit :
> Wow, that's a surprise! Just yesterday I was thinking that it would be
> really nice to have them for a piece of code ;)
>
> But shouldn't we keep the syntax closer to normal attributes and other
> languages(*)? I see a lot of arguments for doing that, with the only
> counter-argument that they would be in the same namespace as the
> built-in attributes (which should not be that bad, as this is very low
> level language stuff).
>
> (*) i.e. @mytype or @("string") and without the '[]'

+1

In addition, this is [] thing will require lookahead when parsing to 
detect if we have an expression (array literal) or a declaration.


More information about the Digitalmars-d-announce mailing list