News for hackers. Stuff that matters.
Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever by ars on Thursday July 13, 2023 @01:26PM (#36712815)
Java just needs one small change to fix exceptions.

Instead of the exception type being checked or unchecked, the throw should specify checked or unchecked.

So for example the first time the exception happens it can throw a checked exception for the caller to deal with.

If the caller doesn't deal with it it can simply throw its way all the way to the top without every single function needing to declare they handle it.

Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever by kaba0 on Thursday July 13, 2023 @04:07PM (#36715229)
The proper solution is effectful type systems that are polymorphic to effects, like exceptions.