4 ms·
D has a nice middle-road between a preprocessor and an AST-munger: mixins. The mixin function is essentially compile-time eval: whichever string you pass it get
by Doxin 6y ago
D has a nice middle-road between a preprocessor and an AST-munger: mixins. The mixin function is essentially compile-time eval: whichever string you pass it gets compiled into the program at that point. Combined with solid compile-time function evaluation and doing wacky things like brainfuck-as-a-DSL becomes fairly trivial.