2 ms·
User 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
by Buttons840 8y ago
User 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".