Controversial opinion: In most cases, exceptions are actually a good language feature.
Conversation
I've found Java's checked exceptions helpful, because they tell me whether I need to handle them, or change my method signature (which is also the downside). In C++ I try to not use use exceptions, but third party code does (or STL), and it's not easy to mix.
2
3
Checked exceptions in Java are super painful and interact really badly with lambdas.
Maybe they’d be less painful if Java had sum types, but it doesn’t (and the lambda interactions would still be bad)
4
5
They might be less painful if you had more ways to abstract over what exceptions a function can throw, like in the newer work on typed effect systems (which are pretty much checked, resumable exception systems). See Koka and Effekt for examples of this.


