Proposal: user defined attributes

Artur Skawina art.08.09 at gmail.com
Thu Mar 22 07:31:04 PDT 2012


On 03/21/12 14:36, Adam D. Ruppe wrote:
> On Wednesday, 21 March 2012 at 08:29:23 UTC, Tove wrote:
>> With the mixin improvement proposal any arbitrarily complex feature can be implemented in the library, appearing to enjoy first class syntax with just 1 extra character penalty vs the compiler.
> 
> My main concern with the library implementation isn't
> syntax.
> 
> The big question is still: where will you put the
> annotation data?

A (new) compile-time only (mutable) storage class.
It's probably needed for other things too, to avoid compiler-specific
pragmas+section-attributes+linker-magic to achieve the same effect.

For run-time accessible custom attributes (if those are even necessary),
the lib solution wouldn't be much different than a built-in one anyway.

artur


More information about the Digitalmars-d mailing list