UDAs - Restrict to User Defined Types?

deadalnix deadalnix at gmail.com
Sat Nov 10 07:37:42 PST 2012


Le 08/11/2012 11:56, simendsjo a écrit :
> On Thursday, 8 November 2012 at 09:05:31 UTC, Jacob Carlborg wrote:
>> I think we should only allow user defined types marked with
>> @attribute, i.e.
>>
>> @attribute struct foo {}
>> @attribute class foo {}
>> @attribute interface foo {}
>> @attribute enum foo {}
>>
>> And so on.
>
> Or
> struct @foo {}
> interface @foo {}
> enum @foo {0
> etc
>

I love it ! Shorter and achieve the same result, very readable, that is 
THE solution.


More information about the Digitalmars-d mailing list