23 June 2023 — 25 min, 6316 words
Who doesn't like special privileges? In Rust, the macros grant us this little extra authority over the language, enabling any developer to produce Rust source code from a domain-specific language or to modify the existing code by attaching an attribute.
Macros are undoubtedly a great and powerful feature, but isn't there a risk that we substitute them for new features that would have otherwise improved the language and its libraries? And aren't they sometimes gnawing away at the clarity of the code?
Let's examine this issue in the context of language evolution, and see if we can make a few suggestions.