Skip to content

Why did the 11th step in Async () algorithm become worse readable? #1772

Open
@dSalieri

Description

@dSalieri

Reading the last draft of ECMAScript 10.0, I noticed that the 11th step in the Async () algorithm is less reader friendly.

  1. Set the code evaluation state of asyncContext such that when evaluation is resumed with a Completion completion, the following steps of the algorithm that invoked Await will be performed, with completion available.

Let's just say the sentence is well understood to the phrase will be performed. Further, it is generally not clear what is meant: ... with completion available. And yes, what is the meaning of the word available in this context? For me, if you remove the word available, the meaning of step 11 of the Await () algorithm will not change.

Well, also the combination Completion completion is not very successful, especially if you read without markup.

And now let's get back to the version of this proposal from ECMAScript 8.0:

  1. Set the code evaluation state of asyncContext such that when evaluation is resumed with a Completion resumptionValue the following steps will be performed:

Another thing! There’s nothing to complain about. Except one case: clarification of where the performation of the algorithm that invoked Await () should continue from.

Why is the most readable version of ECMAScript 8.0 not used?

In fact, you can make a hybrid of these two options to get something like the following:

  1. Set the code evaluation state of asyncContext such that when evaluation is resumed with a Completion resumptionValue, the following steps of the algorithm that invoked Await will be performed:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions