Ary Borenszweig:

Maybe checked exceptions are bad only for the type system of Java. Maybe for a language that has global type inferencing on the exceptions such
feature becomes better.

Why?

I am not an expert of type systems, so this is this just an hypothesis. What are the disadvantages of checked exceptions? One problem is that those annotations are heavy, make the code rigid to change, and this doesn't go well with normal programmer laziness. A global type inferencer (that doesn't work well with the dynamic nature of Java) avoids the need for all exception annotations, but forces you to catch exceptions somewhere, assuring no holes remain if you don't want holes.

Bye,
bearophile

Reply via email to