|
|
|
|
|
by breadwinner
396 days ago
|
|
Side effects are not allowed in functional style programming. Exceptions are side effects, it doesn't matter whether they are checked or unchecked exceptions. https://jessewarden.com/2021/07/why-functional-programmers-a... While composing methods in stream style is convenient, methods that can throw exceptions warrant more careful coding, so convenience should not always be the priority. |
|
If you really want to see everything through the FP lens, exceptions are exactly like Result<T, E> with implicit do-notation.