The big problem with Java checked exceptions was that the language was simply not flexible enough in other areas to handle higher-order stuff. For example, quite often you want to define something like "this method takes object X, and throws everything that X.foo() can throw, and also E". But there's no way to express it in Java. So the moment you start doing any sort of HOF-like stuff - even as simple as event handlers - you have to struggle with checked exceptions.
This is not a problem in Rust.
Re:My Struggles with Rust
by jimktrains2 on Sunday May 07, 2017 @02:50PM
(#14286889)
> I think twenty-five years ago there were similar hopes and dreams for Java checked exceptions.
Yeaaaaaaah. I remember being a very strong supporter of checked exceptions before I got into a giant codebase and saw how not having speced a sane exception type can cause lots of pain and some really long declarations or dropped exceptions.
catch (Exception e) { throw new RuntimeError(e); }
:(You're right, I guess time will tell.
I think twenty-five years ago there were similar hopes and dreams for Java checked exceptions.