Support () => {}() syntax?

Olivier Lalonde olalonde at gmail.com
Fri Sep 30 19:54:40 UTC 2016


I noticed the proposal was made about 5 years ago but is still in stage-0.
Is there anything holding it up?

On Fri, Sep 30, 2016 at 11:59 AM, Tab Atkins Jr. <jackalmage at gmail.com>
wrote:

> On Fri, Sep 30, 2016 at 7:23 AM, Allen Wirfs-Brock
> <allen at wirfs-brock.com> wrote:
> > On Sep 30, 2016 6:10 AM, Kevin Smith <zenparsing at 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 at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>



-- 
- Oli

Olivier Lalonde
http://www.syskall.com <-- connect with me!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160930/129af2c1/attachment-0001.html>


More information about the es-discuss mailing list