News for hackers. Stuff that matters.
Re:JavaScript async/await implemented in V8 by mstade on Tuesday May 17, 2016 @04:49AM (#11712101)
I'd agree with you, and I'm keen to learn the real answer. My guess would be that some initial optimizations can occur without having to also parse and analyze the body of a function, potentially having significant performance benefits to reducing the boot time of a program.
Re:JavaScript async/await implemented in V8 by Klathmon on Tuesday May 17, 2016 @07:50AM (#11712774)
the simple version is that because `await` wasn't a keyword before, it can be a named function.

So `await (x)` is ambiguous. Making the outer function `async function () {...}` makes await a keyword inside that function, allowing them to move forward with that syntax in a non-breaking way as the parser now knows that there can't be a function named `await` inside any async functions.