3 ms·
> exceptions, and consistent, universal use of monadic return types, are isomorphic and can have the same evaluation characteristics. I feel like there is a sm
by _hl_ 8y ago
> exceptions, and consistent, universal use of monadic return types, are isomorphic and can have the same evaluation characteristics.
I feel like there is a small but important difference. Encoding exceptions in monadic return types allows the type system to guarantee that all exceptions are handled, or at least considered by the programmer. That is a very strong guarantee, especially as you put up layers and layers of foreign libraries and abstractions.