News for hackers. Stuff that matters.
Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever by renewiltord on Thursday July 13, 2023 @10:45AM (#36709977)
Ultimately, core language features that make things ergonomic enough for lazy developers to get it right will result in better software.

And ones that are so unergonomic that only industrious developers will get them right will result in worse software.

Modern languages allow these to be zero cost abstractions so there is little tradeoff.

Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever by misja111 on Thursday July 13, 2023 @10:54AM (#36710151)
I have been coding in Scala/ Haskell for the last 10 years, before that 15 years in Java. What I'm seeing is that there are as many lazy developers in FP as there are in Java, maybe even more. And despite all the nice safeguards that FP provides, there are still plenty of ways for lazy devs to work around them.

For instance the IO monad, which is used everywhere Scala/Cats. It can contain a result or an error. If you don't feel like checking for an error after you called some method, you can just pass it up and return the IO from your method. Does that sound familiar? It behaves just like a checked exception, the only difference is that methods don't need to declare any error or exception in their IO signature.

Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever by mrkeen on Friday July 14, 2023 @02:38AM (#36720228)
> It behaves just like a checked exception, the only difference is that methods don't need to declare any error or exception in their IO signature.

Then it behaves like an unchecked exception. Which is fine.

'Checking' is the act of modifying your source code to declare the error.