D2 GUI Libs
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Dec 14 07:42:51 PST 2009
Adam D. Ruppe wrote:
> On Mon, Dec 14, 2009 at 07:24:11AM -0800, Andrei Alexandrescu wrote:
>> D2 will include properties that are understood by the compiler. We
>> currently don't have a design for user-defined properties.
>
> Can I suggest something very simple: make them accessible from __traits,
> and leave the rest to the library. Accept @anything_at_all.
>
> @myprop int a;
>
> assert(__traits(getAnnotations, a) == [ "myprop" ]);
Probably it's easier to (also) offer is(a == @myprop).
But we couldn't make static foreach part of D2.
Andrei
More information about the Digitalmars-d
mailing list