On Wed, Nov 12, 2014 at 7:24 PM, Tab Atkins Jr. <[email protected]> wrote:
> Marking a function as "top-level" is just syntax sugar for calling
> .done() on the returned promise. (Assuming that .done() can forward
> rejections to window.onerror.) It might be useful, I dunno, but it
> doesn't offer anything fundamentally new.
>
It would be syntax sugar for:
(async function foo() {
var x = await bar();
var y = await baz();
})().done();
Imaging writing lots of async code, where there are lots of top-level
async functions... that seems like a wild thing to impose on users.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss