Newbie initial comments on D language - RTTI and run-time reflection
Christian Kamm
lastname at without-this-incasoftware.de
Tue Jan 29 01:17:20 PST 2008
Walter Bright Wrote:
> I agree with the importance of RTR (runtime reflection).
>
> But as Andrei and others pointed out to me, with good compile time
> reflection D can achieve runtime reflection with the addition of a
> simple call to a library.
Just take a look at Jascha Wetzel's ClassInfoEx to see what's possible in D 2 today:
http://www.mainia.de/classinfoex.d
Adding his mixin to a class definition exposes the __traits compile time information at runtime. I expect you could also add the class name to a global registry to get at the information by name instead of classinfo.
Christian Kamm
More information about the Digitalmars-d
mailing list