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

There is no macro needed here. You just write the code, then execute it at compile time. This is designed properly, it's not any where near as hacky as C++'s constexpr


No need for macros, eval-when is a special operator designed for this:

    (eval-when (:compile-toplevel)
       ...)
You can also have read-time macros or load-time values, depending on what you need.




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

Search: