qwertyasdef

joined 1 year ago
[โ€“] [email protected] 8 points 10 months ago

Hey, I like checked exceptions too! I honestly think it's one of Javas's best features but it's hindered by the fact that try-catch is so verbose, libraries aren't always sensible about what exceptions they throw, and methods aren't exception-polymorphic for stuff like the Stream API. Which is to say, checked exceptions are a pain but that's the fault of the rest of the language around them and not the checked exceptions per se.

[โ€“] [email protected] 8 points 1 year ago

If you don't need to reuse the collection or access its items out of order, you can also use Iterable which accepts even more inputs like generators.