News for hackers. Stuff that matters.
Re:Why Checked Exceptions Failed by iainmerrick on Saturday July 15, 2023 @05:18PM (#36741045)
Right, I was thinking that this is the answer to the supposedly intractable problem posed by the original article.

Just make your ExampleInterface generic -- ExampleInterface<T>.foo() throws T.

That technique works really well, and I don’t understand why it isn’t more widely used (or at least it wasn’t when I last used Java for serious work).

There are no comments on this comment yet.