News for hackers. Stuff that matters.
Re:V8 adds support for top-level await by dlbucci on Tuesday September 24, 2019 @08:16PM (#21066206)
Not unless promises are implemented with generators. I dunno though, I feel like there's some overlap between the two concepts, so maybe they are?
Re:V8 adds support for top-level await by pitaj on Tuesday September 24, 2019 @08:33PM (#21066343)
Promises are just objects which represent an asynchronous value.

Async/await are coroutines: they have a shared context, stack, etc. They can be paused and resumed.

The implementation of async/await depends on the engine, but I'm pretty sure they use the same generator backend.

Babel and other transpilers convert async functions actual generator functions. By contrast, promises are a fairly simple runtime library.