4 ms·
This is why I like the Either monad found in functional programming. You either have your return value or the error. No exception handling nonsense.
by k3vinw 3y ago
This is why I like the Either monad found in functional programming. You either have your return value or the error. No exception handling nonsense.
- rowls66 3y agoIs it really that much different? You still need to handle a Left value, and a lot like handling an exception.
- ivanjermakov 3y agoIt is different because this way all possible results and failures are known as type information. How to handle erroneous state is the responsibility of the result consumer, given the availability of rich API to unwrap, bind or transform error variants.
- lostmsu 3y agoThis was in Java with checked exceptions.