2 ms·
This problem was already solved a long time ago: asynchronous execution is a monad (as is error handling and list comprehension and any number of other fun feat
by saurik 5y ago
This problem was already solved a long time ago: asynchronous execution is a monad (as is error handling and list comprehension and any number of other fun features), and do syntax is that syntax sugar people are looking for that lets you decide to dip below the abstraction on a case by case basis... only no one seems to want to build support for monads into their language as they think they are too complicated or smell like haskell (is that even a bad thing?!) or something (and then you get awkward stuff like Rust deciding to take the data structure from a popular monad--Either, as Result--but providing none of the scaffolding or behaviors or synergistic language features to make it pleasant to use :/).