3 ms·
The reason we have await in JS is particularly because it is _less_ powerful than generators and you can make more assumptions about it and how one uses it as w
by inglor 7y ago
The reason we have await in JS is particularly because it is _less_ powerful than generators and you can make more assumptions about it and how one uses it as well as write better tooling.
This is why we have await in Python and C# as well, eventhough we know how to write async/await with coroutines for 10 years now :] Tooling and debugging is super important.
- klodolph 7y agoThis is an important argument. Less powerful constructs are easier to combine and understand. For example, call/cc is very powerful, but I would prefer to use various less powerful constructs like try/except/finally which are clearer.