Hacker News new | ask | show | jobs
by LennyWhiteJr 1360 days ago
> Checked exceptions are optional. But they're one of the BEST features in Java.

No

> So much code fails unexpectedly. When you want to build a professional application you need to handle every error.

Yes

> Checked exceptions help you avoid that nonsense.

Wrong

> People hate checked exceptions because of laziness. Java guards you against yourself.

Wrong

Java checked exceptions are almost universally regarded as being a mistake because they don't actually solve the problem they were meant to solve, and they make the code extremely hard to work with.

See this post from Roman Elizarov: https://elizarov.medium.com/kotlin-and-exceptions-8062f589d0...