I hope more languages get these features

all 2 comments

sorted by: hot top controversial new old
[–] 2 points 1 year ago

"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.

  • source
  • [–] 2 points 1 year ago

    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.

  • source