I'd agree that we don't need `Promise.p.wait`, but I think eventually, ES
is going to need a spec for an event loop. Or at least an interoperable
spec agnostic of runtime should be created somewhere, like the eventual
module loader.

On Thu, Feb 4, 2016, 19:20 Jan-Ivar Bruaroey <[email protected]> wrote:

> On 2/3/16 11:39 PM, Bob Myers wrote:
> > Promise.resolve(42) . then(wait(1000)) . then( /* cb */);
>
> With ES6 I prefer the straightforward:
>
>      var wait = ms => new Promise(resolve => setTimeout(resolve, ms));
>
>      Promise.resolve(42) . then(() => wait(1000)).then(() => { /* cb */ });
>
>   Too simple to standardize IMHO.
>
> .: Jan-Ivar :.
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to