3 ms·
While I also love many things about Kotlin, the one thing that always sticks out like a sour thumb is error handling. While Javas checked exceptions had a lot
by LinXitoW 4y ago
While I also love many things about Kotlin, the one thing that always sticks out like a sour thumb is error handling.
While Javas checked exceptions had a lot of problems, at least there was a way to declare the output (errors are ouput) of a function on a type system level.
With Kotlin, that's just gone. You can fiddle with Result type (or make your own), but you lose a lot of the ease of "bubbling up" errors.
How do you handle errors? (I wished Kotlin had error handling like Rust, which is the best that exists, imho)
- lmm 4y agoYou might like Scala (possibly enhanced by something like Monadless or Each , but personally I find the explicit for/yield approach very worthwhile).