News for hackers. Stuff that matters.
Re:DConf 2026 in London by michaelt on Tuesday July 28, 2026 @03:18AM (#49080472)
> The worst thing about exceptions is that you can't tell from the type signature of a function whether it might throw one.

In Java exceptions can be part of a method's declared type information, so handling is checked at compile time and IDEs can display the info.

Unfortunately certain Java missteps made this design unpopular these days. For example, for many years new String(bytes, "UTF-8"); made it mandatory to catch a UnsupportedEncodingException despite the language spec guaranteeing UTF-8 would be available. A later version of Java addressed it, but still...

Re:DConf 2026 in London by vips7L on Tuesday August 04, 2026 @05:44PM (#49175618)
Java's problem with checked exceptions is that they didn't add them fully to the type system (the lambda problem), and they never added any syntax sugar to make them easier to deal with. I really love checked exceptions and wish we could get some improvements.