Re: How about awaiting Arrays ?

2017-03-11 Thread Andrea Giammarchi
Nice one, but at that point `const all = a => Promise.all(a)` seems a better option. I think the point here is that we all need that and repeating the pattern every single time feels like a very clunky experience. `await.all` looks like a win 🎉 On Sat, Mar 11, 2017 at 6:24 PM, Axel Rauschmayer

Re: Feedback on Iterable Numbers Proposal?

2017-03-11 Thread liorean
> On Sun, Feb 26, 2017 at 7:40 PM, kdex wrote: >> On that note, it might make more sense to add range literals. On 26 February 2017 at 20:50, T.J. Crowder wrote: > That was my thought as well -- or at least, ranges if not range literals. (A > simple `Range` is trivial to implement, but I'd rathe

Re: How about awaiting Arrays ?

2017-03-11 Thread Axel Rauschmayer
I like the following way of using `Promise.all()`: ```js const all = Promise.all.bind(Promise); const allTheThings = await all([pa, pb, pc]); ``` > On 3 Mar 2017, at 13:43, Andrea Giammarchi > wrote: > > Not the first time I accidentally type the following: > > ```js > const allTheThings = a

Do we really need async generators?

2017-03-11 Thread Axel Rauschmayer
I’ve thought some more about the async iteration proposal [1] and my thinking has evolved: * I find the async iteration protocol and `for-await-of` useful. * But I still suspect that Communicating Sequential Processes (i.e., async functions plus library code) are a simpler solution than async ge