I wish I could use D for everything
Robert Fraser
fraserofthenight at gmail.com
Thu Apr 30 15:46:47 PDT 2009
Steven Schveighoffer wrote:
> Yes, I use reflection in some of my code, and it definitely has to come
> to D sometime. At least if I wanted to port my current project to D it
> would have to ;)
It's in D, just not standardized. There used to be a project
"flectioned" by Thomas Khune that allowed reflection by either importing
the map file or adding debug symbols in Windows (in Linux, it worked
even on non-debug builds). It doesn't compile on the newer versions of
D, but it shouldn't be too hard to fix up.
A different option would be to use some template/mixin magic to add
specified classes to a set of exported/reflectable types. A good example
of this is MiniD's binding libraries or PyD, which allow you to very
easily wrap a module/class/etc. and make the names visible to a dynamic
language.
More information about the Digitalmars-d
mailing list