3 ms·
> You can't tell what exceptions the piece of code you're calling will throw. Which is why I actually like Java's Checked Exceptions, at least for public-API p
by Terr_ 10y ago
> You can't tell what exceptions the piece of code you're calling will throw.
Which is why I actually like Java's Checked Exceptions, at least for public-API purposes.
It's really the exact same principle as having a contract for functions' return-values.
- _pmf_ 10y agoI like them, too. You can easily opt out of the "checked-ness" by wrapping it in a non-checked exception, so the argument that it pollutes your application is just a non-issue for me.
- AstralStorm 10y agoThis would have to work like the deprecated throw() statement and change the mangling scheme so that no linking errors would occur. I'm pretty sure it was proposed more than once in the standard committee.