Le 06/04/2012 12:17, Walter Bright a écrit :
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'.

Why can't attribute be attached on declaration ?

By the way, this whole qualify the type or something is a big misfeature. annotation should be attached to the declared stuff.

@attr Bar foo() { return Bar(); }

is qualifying « foo ». Qualifying bar make no sense whatsoever.

Reply via email to