3 ms·
Surely it's nice not having to worry about it, but how is that better over explicit await? If a sub-sub-sub-function suddenly decides to yield, you might not e
by bfred_it 9y ago
Surely it's nice not having to worry about it, but how is that better over explicit await?
If a sub-sub-sub-function suddenly decides to yield, you might not even know that your whole path is waiting for that. Right? Perhaps you need baz() to run asap but that isn't clear without looking deep into bar().
- ufo 9y agoOne big advantage is that higher order code can work with both sync and async code. The simplest example would be a for each iterator but this also applies to anything else that calls a function or method that is passed in