4 ms·
The example of the exception being thrown late (essentially, an exception being a type of side-effect) is quite good. Would it be fair to say that this is an a
by maehwasu 11y ago
The example of the exception being thrown late (essentially, an exception being a type of side-effect) is quite good.
Would it be fair to say that this is an advantage of the Haskell approach of (for example) encapsulating an operation that might fail inside a Maybe? You get to make the failure aspect explicitly part of a monad, and make sure you "know" where it's happening?
- TazeTSchnitzel 11y agoWell, Haskell also has something similar to the more traditional exceptions within the IO monad (ioError).