4 ms·
> Note that people now consider that as a mistake, people prefer having Exceptions be hidden instead of explicit and requiring handling like that. What people?
by newZWhoDis 4y ago
> Note that people now consider that as a mistake, people prefer having Exceptions be hidden instead of explicit and requiring handling like that.
What people? Please tell me where they’re at so I can tell them they are wrong (lol)
But seriously, I could not disagree more.
- lenkite 4y agoThe designers of the Java functional and stream library for one. None of the functional contracts have throws. So you are forced to have un-checked exceptions for everything, unless you want a truly mind-boggling amount of try-catch everywhere which will rapidly exceed your normal code by factor of 2x-3x.
- mike_hearn 4y agoIn Java, yes. Note that the JVM doesn't enforce checked exceptions. It's a language level thing. So in Kotlin for example, where all exceptions are unchecked, you can use the streams library without needing try/catch.
- PaulHoule 4y ago... or you can just use a sane FP library like https://github.com/paulhoule/pidove https://github.com/paulhoule/pidove Some people don't like the Lispy signatures so I did start coding up a version with with a fluent interface but didn't quite finish. Overall I would say the implementation of lambdas and method references in Java 8 was genius, but the stream library was a big mistake. Part of it is that has this cumbersome API that in principle would let it optimize query execution by looking at the pipeline as a whole but doesn't really take advantage of it.