Defer expression

Matthew Robb matthewwrobb at gmail.com
Fri Aug 18 05:17:14 UTC 2017


Yeah essentially although I'd think of it more as sugar for:

(async () => { await null; ... })()

On Aug 17, 2017 4:17 PM, "Tab Atkins Jr." <jackalmage at gmail.com> wrote:

> On Thu, Aug 17, 2017 at 12:12 PM, Matthew Robb <matthewwrobb at gmail.com>
> wrote:
> > Honestly have there been any proposals for something like `do async { //
> can
> > await here  }` which would produce a promise in the enclosing scope
>
> Do-expressions haven't advanced in general yet, but if/when they do,
> this seems like it might be reasonable. It's just sugar for the
> `Promise.resolve().then(()=>{...})` expression, right?
>
> ~TJ
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170818/53ba35b5/attachment-0001.html>


More information about the es-discuss mailing list