3 ms·
Haskell's IO monad says, "Hi! With me you don't need exceptions and you don't need to put an if statement after every function call."
by WkndTriathlete 5y ago
Haskell's IO monad says, "Hi! With me you don't need exceptions and you don't need to put an if statement after every function call."
- gpderetta 5y agoHow is the implicit control flow in do notation different from exceptions? If anything, the issue is between checked and unchecked exceptions.
- mibsl 5y agoHaskell's IO monad actually has excellent exception support, including async exceptions and masking them in critical sections. There are `Maybe` and `Either` and they're great at streamlining error handling in pure code, but when it comes to IO most libraries just throw exceptions (including the standard library).