On Fri, Sep 30, 2016 at 7:23 AM, Allen Wirfs-Brock <al...@wirfs-brock.com> wrote: > On Sep 30, 2016 6:10 AM, Kevin Smith <zenpars...@gmail.com> wrote: >> Ideally there will be an `async` version of do expressions, which evaluate >> to a promise: >> >> ``` >> let promise = async do { >> await something(); >> }; >> ``` >> >> (BTW, if we get such a thing, we might not really need >> top-level-module-await...) > > +1 !!
Aw dang, yeah, I really like that. (Obviously the example given is trivial, as just calling something() directly would give the exact same result, but being able to do more complicated stuff with the result means inline promise-chaining without having to asyncify your whole function!) ~TJ _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss