Custom attributes (again)

Timon Gehr timon.gehr at gmx.ch
Fri Apr 6 04:05:30 PDT 2012


On 04/06/2012 12:17 PM, Walter Bright wrote:
> On 4/6/2012 2:18 AM, Ary Manzana wrote:
>> On 4/6/12 3:54 PM, Walter Bright wrote:
>>> On 4/6/2012 12:49 AM, Alex Rønne Petersen wrote:
>>>> What about type declarations? I think those ought to be supported too.
>>>> E.g. it
>>>> makes sense to mark an entire type as @attr(serializable) (or the
>>>> inverse).
>>>
>>>
>>> That would make it a "type constructor", not a storage class, which we
>>> talked about earlier in the thread. I refer you to that discussion.
>>
>> What's the difference between "type constructor" and "storage class"
>> beside the
>> name?
>
> static const(int)* foo;
>
> static is a storage class. const is a type constructor. There is no type
> 'static'.

Still, the 'static' in

static struct S{
    // ...
}

Affects S. Correct?


More information about the Digitalmars-d mailing list