Need reflection facilities

Dave Woldrich dave at woldrich.com
Wed Jan 3 15:00:52 PST 2007


> Addendum:  Kirk is right on the money about the Don's Meta library.  You
> might be able to put something together that works via explicit
> registration of classes like so:
> DeeFitRegister!(MyClass);
> That said, Meta is a work of Template Ninjitsu that is hard to top.
> Tuples and the rest of D's meta programming capabilities should help you
> decompose classes and structs from there.
> But if you need to answer questions like Class.nameof("Foobar"), then
> you've already out-stripped what can be done at compile-time. :)

Yeah, for fit implementations, I need something like Java's "Object
Class.forName(String clazz)", "Field Class.getField(String name)", and "Method
Class.getMethod(String name, Class[] parameterTypes)"  :(  So maybe I'm asking for
too much, but I hope not since I can mostly get what I want in C++ and that's
nearly a full letter less than D.  :)

Thanks,
Dave Woldrich



More information about the Digitalmars-d mailing list