|
|
|
|
|
by jkoudys
2508 days ago
|
|
But it does require knowledge of generators. You're suspending a function during execution; that's what a generator is. We could've just named a global `async` that declares a coroutine FN on promises, and named `yield` as `await`, and the whole thing would look identical to now except for an extra paren and asterisk. You wouldn't need to understand their inner workings any more than you do with async/await now. |
|
That's like saying "Ordering from Amazon does require knowledge of driving a van. That's how the stuff comes to your home!".