3 ms·
I've recently decided that all this async and evented stuff is just too hard to reason about. A proper language should have (lightweight) threads if it wants to
by arianvanp 11y ago
I've recently decided that all this async and evented stuff is just too hard to reason about. A proper language should have (lightweight) threads if it wants to support concurrency. Seems a lot easier to reason about.
See go or haskell for example.
- inglor 11y agoYou 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.