News for hackers. Stuff that matters.
Re:Rating 26 years of Java changes by samus on Sunday October 12, 2025 @04:48AM (#45556548)
When you use lambdas you lose control over when and how often your code gets executed. Since checked exceptions are very often thrown by code that has side effects, I'd consider the friction to be a feature.

> collecting all the thrown exceptions in a separate loop

It's really not comfortable to do so in Java since there is no standard `Either` type, but this is also doable with a custom collector.

Re:Rating 26 years of Java changes by gbear605 on Sunday October 12, 2025 @04:46PM (#45561745)
> Since checked exceptions are very often thrown by code that has side effects, I'd consider the friction to be a feature.

This is true, but I think that it’s partly true because checked exceptions are cumbersome here. In my ideal world, the majority of functions would throw exceptions, testing cases that today are either missed or thrown as unchecked exceptions.