|
|
|
|
|
by karoladamiec
4023 days ago
|
|
Well promises help. And then they stop :). Stop helping. They just break under the weight. If you have promise chain that gets too long, you will feel the pain. The whole thing is, when some IO returns 1 or 2. And your next step is to do a or b depending on the reply. How is your neat promise chain looking now? Then repeat 100 times :( Not even mentioning error handling... and stack traces. So i do agree that it depends what you do a lot. Maybe there are domains where it is not important... but i still need to see that one. And i will take blocking IO with try/catch 10 times out of 10. Even when it is not critical. It is just nicer and easier to reason about. |
|
Promises + Generators = The sweet spot.
Check out https://www.npmjs.com/package/coroutiner to make it stupid-easy to coroutine your entire app.