How about awaiting Arrays ?

Michał Wadas michalwadas at
Fri Mar 3 16:51:15 UTC 2017

Actually I would go with

await ...expr;

As sugar for:

await Promise.all(Array.from(expr))

On 3 Mar 2017 17:15, "T.J. Crowder" <tj.crowder at> wrote:

On Fri, Mar 3, 2017 at 3:28 PM, Matthew Robb <matthewwrobb at> wrote:
> I think this conversation needs to happen but I am not sure baking
> it into Array facilities makes the most sense.
> In my experience with async/await I am very often needing Promise.all but
> in some cases the other forms of multi promise capabilities. What if we
> expanded the keyword `await.all [...]; await.race [...]`

Heh, I was thinking of that too, as an alternative to the `awaitall`
and such I suggested to Andrea so we didn't need to add Yet More
Keywords. :-)

await.all iterable;

instead of

await Promise.all(iterable);

? That seems pretty clear to me, and doesn't seem like a big
specification or implementation burden (he said, talking through his

-- T.J.
es-discuss mailing list
es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list