3 ms·
The "static if (directed) { <code> }" part threw me for a loop. The comment says it's evaluated at compile time to control whether the methods are included. T
by sixbrx 13y ago
The "static if (directed) { <code> }" part threw me for a loop. The comment says it's evaluated at compile time to control whether the methods are included. That's pretty neat!
- jeremiep 13y agoYou can also call pure D functions at compile-time, along with mixins this gives you something close to the power of Lisp macros.
- he_the_great 13y agoD provides some very appetizing features for meta and generic programming. You can get some insight from questions like this: http://stackoverflow.com/questions/7300298/metaprogramming-in-c-and-in-d http://stackoverflow.com/questions/7300298/metaprogramming-i...