tc39/proposal-async-await

function redundant?

Closed this issue · 2 comments

Is it really necessary to have "async function" instead of simply "async"?

I think async() { } is valid syntax (it's a function invocation followed by a block), because async is a valid variable name.

Yes, function is necessary. async() { } is not valid syntax, but async()\n{ } is (eg. Allman/GNU styles).