Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever
by rcme on Thursday July 13, 2023 @10:04PM
(#36718582)
What's the rationale behind adding exceptions?
Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever
by emi2k01 on Thursday July 13, 2023 @10:47PM
(#36718861)
I'm not sure what they mean by adding exceptions.
AFAIK, the only proposal related to exceptions is adding a `try` block that would scope the `?` operator to that block instead of the current function.
It works great. Also, note that f() doesn't care about the type of error returned by g(), and that it will be a compilation error if g()'s error type turns into something incompatible.
Sadly, there are proposals to add exceptions to rust, and it seems likely they will be accepted, breaking error handling semantics across the entire ecosystem (even in new code, since exceptions are too hard to use correctly).