This is what I think I understand about Rust macros:
- Macros generate code at compile-time.
- There are two categories of macros, "declarative" and "procedural".
- There are three kinds of procedural macros: attribute, derive, and function.
Are there any issues with the above statements?
I think I understand the differences between the three kinds of procedural macros, but I don't understand the distinction between declarative and procedural macros. For example, I think
vec is a procedural function macro, but maybe it is also a declarative macro.
I've done lots of googling to find a good description of these terms, but so far haven't found one that clarifies this for me.