News for hackers. Stuff that matters.
Re:From zero to 10M lines of Kotlin by LinXitoW on Tuesday October 25, 2022 @06:31PM (#33337030)
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)

Re:From zero to 10M lines of Kotlin by lmm on Tuesday October 25, 2022 @10:12PM (#33338908)
You might like Scala (possibly enhanced by something like Monadless or Each , but personally I find the explicit for/yield approach very worthwhile).