3 ms·
That's not really what happened : the core team decided they'd use ".await" instead of a regular prefix await (with good rational) and any people where pretty u
by littlestymaar 7y ago
That's not really what happened : the core team decided they'd use ".await" instead of a regular prefix await (with good rational) and any people where pretty uneasy about that to say the least: most people considered that ultra ugly and confusing for new rust users (and I'm still in that camps even though I'm glad the discussion is finally over).
Here are the results of a survey ran on this syntax on about 400 Rust users from rust subreddit : https://i.redd.it/660zjw4rhsv21.png https://i.redd.it/660zjw4rhsv21.png
You'd see the chosen syntax (field-like access) was one of the most disliked one…
- dbrgn 7y agoI used to dislike the "field-like access" syntax because I was used to "await" being a prefix in other languages, but using await many times in longer function call chains with multiple await calls has totally changed my mind. No need for nested parentheses. No need for splitting up the code just to make it more readable. Syntax is something very emotional and beauty is very subjective. Thanks to the Rust team, the discussion around await syntax was mostly focussed on rational arguments, not around perceived beauty. The outcome is great in my opinion.
- swfsql 7y agoI guess the syntax was already a given, so they just did it regardless of the criticism. I still think there were other, better, postfix options. I also guess that, since part of the implementation was sponsored not by mozilla itself, then also the syntax choice was not led by mozilla itself (nor the overall community). I could be wrong - and I only superficially followed the discussions - but this is the impression that is left on me after all that. edit: but I think that this Ok-wrapping feature is different from the await one, since now there are no more deadline-like pressuring into mozilla/lang team. So I guess that now, something that is generally disliked (if it is) won't actually get into the lang..
- steveklabnik 7y ago> I guess the syntax was already a given, so they just did it regardless of the criticism This is not true. Several people on the lang team (and many community folks) changed their positions several times over the course of the debate.