December 03, 2006
The attached code allows the instantiation of objects at runtime requiring only the fully qualified class name.

sample:
#
# import cn.kuehne.reflection;
# ...
# Object o = new_Instance("std.stream.File");
#

limitations:
1) Windows isn't yet supported.
2) The class has to have an explicit "this()" constructor.

compilation:
1) gcc -m32 -c elf.c
2) dmd -c reflection.d
3) dmd <what ever> elf.o reflection.o

Thomas


December 04, 2006
Awesome!