-
Notifications
You must be signed in to change notification settings - Fork 22
What about Async, Await and Generators?
I have seen what feels like 1,000 articles on how Async/Await killed Promises, victory!
While there are a few excellent articles appropriately skeptical of async/await, such as ES7 async functions - a step in the wrong direction
However most of the press out there seems to be like From Promise API to Async-Await and 6 Reasons Why JavaScript’s Async/Await Blows Promises Away
This is a step backwards for JS patterns.
Simple examples are not the problem, the Async/Await feature itself is too flexible, allowing poorly thought-out code.
Perhaps more sinister, the initial version may seem great - even if only running single-threaded usage. However, time passes, features are added, and before long you have a mess. ("Let's add a permissions check, stick it before profile.update(). Await it, who needs middleware or composition (ahen :sarcasm: ).
- Steps
- Bonus Material