> Checked exceptions in Java are a form of function coloring problem for modern libraries.
So is returning result or error via Either/Expect/Result sum types. Exceptions or Expected, code gets messed up either way.
So is returning result or error via Either/Expect/Result sum types. Exceptions or Expected, code gets messed up either way.
The later fits nicely into the `Function<,>` interface, `Function<T, Result<R, Err>>` vs the former requires a different interface entirely, something like `FuncE<T, R, Err>` where `Err` breaks out into an argument for the throws value of the signature.
Because most of the functional libraries in Java work with Function, BiFunction, etc, we end up with incompatible arguments for common patterns such as `map`, `filter`, etc.