Hygienic Macro

Hygienic Macro

Hygienic macros are macros whose expansion is guaranteed not to cause the accidental capture of identifiers. They are a feature of programming languages such as Scheme and Dylan. The general problem of accidental capture was well known within the Lisp community prior to the introduction of hygienic macros. Macro writers would use language features that would generate unique identifiers (e.g., gensym) or use obfuscated identifiers in order to avoid the problem. Hygienic macros are a programmatic solution to the capture problem that is integrated into the macro expander itself. The term "hygiene" was coined in Kohlbecker et al.'s 1986 paper that introduced hygienic macro expansion, inspired by the terminology used in mathematics.

Read more about Hygienic MacroThe Hygiene Problem, Strategies, Implementations

Other articles related to "hygienic macro":

Implementations - Languages With Hygienic Macro Systems
... Scheme - syntax-rules, syntax-case, syntactic closures, and others ... Racket - an offshoot of Scheme ...