Bottoms Scheme implementation project
history | edit |


As mentioned, we won't implement Scheme style hygienic macros, because they are much work to implement, because it is instructive to learn the basics first, and because implementing solutions for the needs that hygienic macro systems intend to solve in piecewise manner might allow for opportunities for insight and solutions that would be missed otherwise.

Macros are an extension of the compiler. Unless the compiler is getting very complex, macros shouldn't be made more complex either, right?

We'll implement alternative solutions to (some of) the problems that hygienic macro systems solve.



Other problems are preventing accidental variable capture (so-called hygiene) and ensuring the generated code is well-typed. Lisp-style macros, Scheme hygienic macros, the camlp4 preprocessor, C++ template meta- programming, and Template Haskell solve some of the above problems. Of the widely available maintainable languages, only MetaOCaml solves all of the above problems, including the well-typing of both the generator and the generated code. (From Multi-stage programming with functors and monads)