3 ms·
I like them. The only annoyance is that you're forced to wrap your return value in a monad even if the function succeeds. That's type safety for you!
by Lambdanaut 14y ago
I like them. The only annoyance is that you're forced to wrap your return value in a monad even if the function succeeds. That's type safety for you!
- eru 14y agoYes. But that's because the default is non-monadic wrapped and an assumption that it can't go wrong. I'd had to see non-monadic wrapped values to silentry go wrong or raise an exception. (You can do something like Go's panic in pure values. But you are not supposed to do that for recoverable conditions.)
- Evbn 14y agoIn practice, wrapping a return value in a monad looks exactly like returning a regular value in another language: return x.