4 ms·
I see what you're saying - for me, my experience with Java checked exceptions put me off the idea. In Java it led to lots of exception wrapping and leaky abstr
by jwilliams 7y ago
I see what you're saying - for me, my experience with Java checked exceptions put me off the idea.
In Java it led to lots of exception wrapping and leaky abstractions.
Not sure what the answer is - although my golang experience was better.
- brlewis 7y agoThe answer is one of two possibilities: either make the IDE a little dumber and stop highlighting uncaught exceptions, or make the IDE a lot smarter and make it highlight when you catch an exception but don't do anything useful with it. Java programmers need to be comfortable letting exceptions have the default behavior until they're sure they have a better idea. Declaring throws is usually enough.
- specialist 7y agoMy current best guess is Java's checked exception silliness comes from the enterprise framework culture. Too much abstraction, architecture, cleverness, turgidity. I joke that Spring is an Exception obfuscation framework. I've always really liked checked exceptions in my own designs. Though I'm not crazy about the syntax.
- erik_seaberg 7y agoJava blew it on generic exceptions. stream.map(f).collect(...) should be able to throw anything f can throw, but instead f has to wrap everything, which makes people give up and stop declaring checked exceptions.