Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is how async/await is implemented. I think 'await' is almost just a synonym for yield. I didn't invent that part. I just made a faster, better encapsulated, promise free version.


I'm failing to see how async/await has more promises than your implementation.


Async/await requires passing a promise to await. If you read the documentation for async/await, it starts with: "These features basically act as syntactic sugar on top of promises": https://developer.mozilla.org/en-US/docs/Learn/JavaScript/As...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: