TIL eager macro expansion can mean very different things.
Rust macros must expand to valid code, so eager macro expansion allows illegal intermediate states: https://docs.rs/eager/0.1.0/eager/macro.eager.html#macro-expansions
Elisp macros are expanded at runtime unless expansion is eager:
miniblog.
Related Posts
Bril is a cute intermediate language for teaching (think simplified LLVM IR): https://www.cs.cornell.edu/~asampson/blog/bril.html
The idea of providing a standard JSON format to help students write basic passes is really elegant.
Tectonic is a fabulous new implementation of TeX that doesn't require a large distribution, doesn't write intermediate files, and automatically loops TeX and BibTeX!
Macro-expanded lisp works surprisingly well as an intermediate representation for some tasks.
Today, I was able to enumerate all the bound variables pretty straightforwardly, because elisp only has four ways of introducing bindings!
(let, let*, lambda and condition-case)