3 ms·
I think it depends, but I wonder if anything can be done about the problem with checked exceptions in lambdas / for instance the streams. I think the enhanced s
by lichtenberger 3y ago
I think it depends, but I wonder if anything can be done about the problem with checked exceptions in lambdas / for instance the streams. I think the enhanced switch with handling failure is only part of the solution, but I'm also a proponent of having only unchecked exceptions.
- DarkNova6 3y agoI think the Java team is getting there. Everything in the sytanx-space they have worked on moved towards a functional representation of data. Once you have a uniform way to describe non-uniform types (sum types, rust enums etc.), adding exception support to the JDK seems trivial. I've actually made small streaming libraries which also support exceptions, but the problem is that it only works well if you need to support a single exception type. As far as I'm concerned, I like checked exceptions because it improves discoverability, documentation and makes exceptional control flow more visible when reading code (including code reviews).