Proposal: user defined attributes

F i L witte2008 at gmail.com
Sat Mar 17 21:29:52 PDT 2012


F i L wrote:
>     class CoolClass(bool cool)
>     {
>         @CoolType(cool);
>         int type;
>     }

typo **@Cool(cool);

plus, I think a better syntax for attributes might be to have an 
attribute keyword for definitions and only use "@" for 
application:

attribute struct CoolType { ... }
attribute bool isCool;

@CoolType @(isCool = true) string coolText;



More information about the Digitalmars-d mailing list