Conversation

This Tweet was deleted by the Tweet author. Learn more
This Tweet was deleted by the Tweet author. Learn more
Usage or implementation of macros? The usage is just macro!(tokens), and the syntax within it is determined by how the macro defines the DSL. Implementing macros is definitely not pretty for anything complex, as you're messing with a token tree rather than it being normal code.
1
1
If I remember correctly, the reason declarative macros are currently defined with macro_rules! is because there wasn't time to make a good implementation for 1.0 so that was kept as a compromise rather than not having it at all. The macro keyword is reserved for a replacement.
1
I worked on Rust before 1.0 and leading up to it, and I remember clearly that there just wasn't time to make a good declarative macro implementation. It's too important to leave out, so it's designed in a way that's meant to be replaced with the superior keyword reserved for it.
1
Show replies