5 ms·
> 'async as a prefix is intuitive!', but that's only because I saw it first in C# The analogy made in the post, with the possibility of “expression-oriented” k
by childintime 7y ago
> 'async as a prefix is intuitive!', but that's only because I saw it first in C#
The analogy made in the post, with the possibility of “expression-oriented” keywords like .match, suggests that `match expr {..}` is equivalent to `expr.match {..}`. So by analogy `await expr` and `expr.await` are also similar.
So why was the "prefix await" syntax dismissed right out of the gate? It is the option that needs the best argumentation, because 1) it is familiar and 2) match is currently a prefix (keyword), so await could probably also be.
Edit: only the await prefix clearly signals a break in control flow, only the prefix variant emphasizes this. In contrast the dot await syntax hides this.