Skip to main content

Use this tag for questions about design or implementation of language preprocessor macros that are able to perform limited rewriting of source code before evaluation. Do not use for questions about editor macros or design of automation languages.

A macro is a preprocessor function that replaces certain text with other text, before the code is parsed and compiled. Due to their simple text replacement, they are considered unsafe by some languages due to their pitfalls. However, they have the unique capabilities to redefine keywords or create aliases that expand to any syntactic construct.

Related tags: