23 ms·
I'm sold. This post did a good job of addressing my concerns with the syntax, plus a couple others. I'm now looking forward to postfix match. I still kind of w
by andrewflnr 8y ago
I'm sold. This post did a good job of addressing my concerns with the syntax, plus a couple others. I'm now looking forward to postfix match.
I still kind of want postfix macros, though. I saw a couple other neat use cases like `file.write!(...)`
- Buttons840 8y agoUser definable postfix macros might be nice, I don't know. But we don't need user definable postfix macros to have a single `expression.await!()` as a magical macro. There are already magical macros, and to most Rust users `foo!()` means "magic here, read the docs". It would have been syntactically consistent to have `await!()` also mean "magic here, read the docs". 100% of Rust users will recognize the inconsistency of overloading field access syntax. Only a portion of Rust users will dig deep enough into macros to recognize that `expression.await!()` is special and is not defined as a normal macro. By the time a user digs deep enough to realize that, they are ready to understand why that inconsistency was necessary. With `expression.await` new users may ask about the inconsistency and the answer will be "because reasons you can't understand right now".