I think once Java has finished up exception switch-case it will be a model followed by other languages. Being able to catch exceptions at both, method and transaction boundaries will be a boon for readable control-flow.
> and transaction boundaries
What are transaction boundaries? Is Java getting transactions?
Re:Hurl, the Exceptional Language
by throw156754228 on Sunday May 26, 2024 @10:39AM
(#40482519)
Algebraic effects is going in completely the opposite direction.
However, exceptions that a function can throw are part of the function signature in Java unless they extend RuntimeException (and in that case your program won’t compile if you throw an exception without adding it to the signature). While the circumstances in Java make it much easier for IDEs to report uncaught exceptions, it’s a solvable problem for non-runtime exceptions using static analysis.
On the other hand, returning standardised Ok/Err-wrapped values seems like a simpler approach, both in terms of tooling support and developer convenience.