macroexpansion
Macroexpansion is the process by which macros are expanded into ordinary program code. It typically occurs at compile time or interpretation time, before runtime, enabling code generation from compact templates and enabling domain-specific abstractions.
A macro is a construct that takes code as input and returns new code. The compiler or
Two broad approaches exist: textual macros and hygienic macros. Textual macros substitute text and do not respect
Examples and varieties. In Lisp-family languages, macros operate on code as data structures and can generate
Impact and considerations. Macro expansion enables metaprogramming, embedding domain-specific languages, and moving computations to compile time