Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: