3 ms·
You know, Haskell's IO is pretty much equivalent to JavaScript's promises. JavaScript's generators let you have do notation in JavaScript, and using async/await
by inglor 11y ago
You know, Haskell's IO is pretty much equivalent to JavaScript's promises. JavaScript's generators let you have do notation in JavaScript, and using async/await the "evented" stuff becomes not so evented and pretty easy to reason about.
I agree that it's not optimal, but the alternative (implicit IO) has its own share of pitfalls either. The async code that gets produced with modern JavaScript or Python is pretty easy to follow.