2 ms·
1. They are not composable (can't map or flatmap or fold/reduce them). Kotlin helpfully added mapNotNull() and similar methods. 2. you can't return an err
by MrBuddyCasino 4y ago
1. They are not composable (can't map or flatmap or fold/reduce them).
Kotlin helpfully added mapNotNull() and similar methods.
2. you can't return an error value, only the fact that there is no value
Yes I much prefer Rust-like return values, the non-local control flow of exceptions leads to convoluted code and improper error handling.