On Thu, Apr 22, 2010 at 08:38:39PM -0400, bearophile wrote: > If the sequence of functions is known at compile-time your solution can be > used, thank you.
You could perhaps use it to create name/delegate pairs, which you use to build the other arrays later. > Why do you import std.traits? Left over from my first attempt - I was going to use it to get the type of the functions, but instead just did typeof(&T[0]), then forgot to delete the import line. > I think __traits is (mostly) for compile-time, while classinfo is run-time. > (Surely there are ways to design a tidier compile-time and run-time > reflection API). We can build runtime stuff out of the compile time stuff, in theory anyway. Daniel Ribeiro Maciel recently posted some runtime reflection code to the newsgroup, but I haven't had a chance to evaluate it yet. -- Adam D. Ruppe http://arsdnet.net
