ES6,ES7,ES8 and beyond. A Proposed Roadmap.

Sam Tobin-Hochstadt samth at ccs.neu.edu
Sun Apr 21 06:24:25 PDT 2013


On Sun, Apr 21, 2013 at 9:20 AM, Bjoern Hoehrmann <derhoermi at gmx.net> wrote:
> * Sam Tobin-Hochstadt wrote:
>>I don't see what the point of `await` is in your gist.  It looks like
>>all of the work is being done by `function^`, which looks to be sugar
>>for creating a function and passing it to a scheduler like `Q.async`
>>or `taskjs.spawn`.  We could add that sugar if we wanted, and not need
>>to add `await`.
>
> The only language construct that allows yielding control until resumed
> later so far is `yield`, but using `yield` to `wait` is rather awkward.

First, using `yield` is precisely correct in the cooperative
concurrency module of JavaScript. Second, are you genuinely suggesting
that we should add a new keyword with the same semantics just because
the word choice might be awkward in English?

Sam


More information about the es-discuss mailing list