News for hackers. Stuff that matters.
Re:Checked exceptions: Java’s biggest mistake (2014) by ragnese on Friday September 11, 2020 @09:38PM (#24449126)
Ack. Totally agree about Integer.valueOf. I think I agree about IOException, too. Definitely most other people agree that it should've been unchecked and that does seem reasonable, as long as it's really only thrown for "oh shit- someone unplugged the hard drive" errors.

I still think that in theory, the distinction I articulated would be proper.

I'd always prefer returning algebraic data types rather than checked exceptions if I were inventing a new language. But given that Java has nothing in the way of that, I'd still say that one should attempt to follow the hypothetical distinction I articulated, even if Java itself fails at it...

There are no comments on this comment yet.