Earlier quoted context omitted.
I think the issue is with checked exceptions as a solution to how to declare this signature, or at least with how they are designed in Java: if you add a new exception to the signature, every downstream call site needs to change, recursively. This means it is impossible to add new exceptions to library methods without breakage, and even in your own code it may mean hundreds of changes throughout your code to add a ne…
> This means it is impossible to add new exceptions to library methods without breakage That’s a feature, not a bug. If it wouldn’t, an exception of that kind could bubble up at a place you didn’t expect. Also, it doesn’t require that many changes, it only has to be changed up to the point where you intend handling it. I don’t see how rust would be immune to that. Though it is true that polymorphism with respect to c…
You should always be able to handle an unknown exception. Sure you can't do much about it, but it shouldn't be a big deal. An exception only occurs if the code can't continue as expected.
Libraries are supposed to be a point of abstraction. They should be allowed to change their implementation fundamentally as long as they continue to respect the same interface. Exceptions should not be part of the interface explicitly because are they implementation-detail related.