D2 GUI Libs

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Dec 14 08:41:58 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" ]);

I just had a little related idea. If you (Eldar) put the property in the 
naming convention, then you may be able to simplify things by using 
__traits(allMembers, Type), which works now.

For example: all signals start with "signal_" and all slots start with 
"slot_".

Would that work?


Andrei



More information about the Digitalmars-d mailing list