Macro systems vary widely in safety and power across programming languages. C macros operate on token streams with minimal safety, while Lisp macros work on ASTs enabling more powerful transformations. Scheme introduced hygiene to prevent variable capture, and Racket further improved safety with phase separation and scope sets.
•13m read time• From lambdaland.org
Table of contents
C macros: advanced search-and-replace #Lisp macros: operating on ASTs #Scheme macros: hygiene #Racket macros: phase separation and scope sets #Other languages #Conclusion #References #Sort: