I hope more languages get these features
You must log in or # to comment.
It’s an interesting write up. Unfortunately, many of the execution contexts that’d really benefit from the bespoke per-regex code probably wouldn’t appreciate the additional executable size, e.g. embedded applications.
But it certainly has its place elsewhere.
“Wait Evan, did you say heap allocation? Isn’t heap allocation at compile-time impossible?” … Though, I’d bet that some Lisps were doing all this back in the 60s and 70s too, as is usually the case!
Yes, macros in lisp are just normal functions running at compile time, taking in the compile time arguments and outputting code.


