3 ms·
The .await is another thing one needs to teach, and fairly early on so that people reading code examples don't get confused by where the "await" member of struc
by CJefferson 7y ago
The .await is another thing one needs to teach, and fairly early on so that people reading code examples don't get confused by where the "await" member of structures are. It just seems like a really bizarre break in what was fairly clean notation.
- majewsky 7y agoFor me, it helps that ".await" appears as a keyword because of syntax highlighting. It is an odd syntax, but the alternative way of making await a prefix operator instead of a postfix operator would have been way worse for readability. Compare let bar = list_foos().await.first().list_bars().await.first(); vs. let bar = (await (await list_foos()).first().list_bars()).first();