Hacker News new | ask | show | jobs
by WalterBright 144 days ago
D accomplishes this by using Compile Time Function Execution to build D source code from strings, and then inline compiling the D code. Learning a macro language is unnecessary, as it's just more D code.

This kind of thing is very popular among D users.

https://dlang.org/spec/statement.html#mixin-statement

https://dlang.org/spec/expression.html#mixin_expressions