Support () => {}() syntax?

Isiah Meadows isiahmeadows at gmail.com
Thu Oct 6 04:43:27 UTC 2016


Yeah... A top level async `do` expression would be nice, but it doesn't
cover conditional imports very well (especially when exported values depend
on what's imported, which I've done before in CommonJS).

On Sun, Oct 2, 2016, 14:31 Bradley Meck <bradley.meck at gmail.com> wrote:

> To clarify top level await is a synchronization point for module loading.
> While I do think `do` expressions and `do async` have values, I don't think
> they fit the use case of top level await.
>
> On Fri, Sep 30, 2016 at 9: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 !!
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20161006/a7c65187/attachment.html>


More information about the es-discuss mailing list