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.
In Java it led to lots of exception wrapping and leaky abstractions.
Not sure what the answer is - although my golang experience was better.
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.
I've always really liked checked exceptions in my own designs. Though I'm not crazy about the syntax.
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.