What are “hygienic” macros?
The term “hygienic” has been used in connection with macros since the mid 1980s, if not earlier. Broadly speaking, hygienic macros are macros whose expansion is guaranteed to not cause collisions with definitions already existing in the surrounding environment. Kent Dybvig in [Writing Hygienic Macros in Scheme with Syntax-Case] defines macro hygiene as follows: If a macro transformer inserts a binding for an identifier, the new binding will not capture other identifiers of the same name introduced elsewhere. He also defines referential transparency with respect to macros as If a macro transformer inserts a free reference to an identifier, the reference refers to the binding that was visible where the transformer was specified, regardless of any local bindings that may surround the use of the macro. In practice, the term “hygienic macros” usually refers to macros that are both hygienic and referentially transparent according to the above definitions. Hygienic macros were an optional par