ruk·si

🦀 Rust
Macros

Updated at 2024-02-27 20:34

Macros are expanded before the compilation, so you can do pretty much anything with them.

Avoid macros if they are not necessary. Macros are more difficult to read, understand, and maintain than functions.

TODO: procedural macros vs. declarative macros

Sources