Quite a while ago, Niko promised that we would write a summary of the discussion in the language team and the community about the final syntax for the await operator. Our apologies for the long wait. A write up of the status of the discussion is linked below. Before that, though, let me also give an update on where the discussion stands now and where we will go from here.
Brief summary of where async-await stands right now
First, we hope to stabilize async-await in the 1.37 release , which branches on July 4th, 2019. Since we do not want to stabilize the
await! macro, we have to resolve the syntax question before then. Note that this stabilization doesn’t represent the end of the road — more the beginning. There remains feature work to be done (e.g., async fn in traits) and also impl work (continued optimization, bug-fixing, and the like). Still, stabilizing async/await will be a major milestone!
As far as the syntax goes, the plan for resolution is as follows:
- To start, we are publishing a write-up of the syntax debate thus far – please take a look.
- We want to be forward compatible with obvious future extensions to the syntax: processing streams with
for awaitloop). That’s why I’ve been working on a series of posts about this issue (first post here and more coming in the future).
- At the upcoming lang-team meeting on May 2, we plan to discuss the interaction with for loops and also to establish a plan for reaching a final decision on the syntax in time to stabilize async/await in 1.37. We’ll post an update after the meeting to this internals thread.
The writeup is a dropbox paper document, available here. As you’ll see, it is fairly long and lays out a lot of the arguments back-and-forth. We would appreciate feedback on it; this thread is the appropriate place to leave feedback.
As I said before, we plan to reach a final decision in the near future. We also feel the discussion has largely reached a stable state: expect the next few weeks to be the “final comment period” for this syntax discussion. After the meeting we’ll hopefully have a more detailed timeline to share for how this decision will be made.
Async/await syntax is probably the most hotly anticipated feature Rust has gained since 1.0, and the syntax for await in particular has been one of the decisions on which we have received the most feedback. Thank you to everyone who has participated in these discussions over the last few months! This is a choice on which many people have strongly divergent feelings; we want to assure everyone that your feedback is being heard and the final decision will be reached after much thoughtful and careful deliberation.