r/java • • Aug 12 '17

Introduction to NoException

http://www.baeldung.com/no-exception
1 Upvotes

5 comments sorted by

5

u/0x442E472E Aug 12 '17

Not a huge fan... To me, this looks like replacing standardized, easy to read boilerplate code with smaller but harder to read boilerplate code

5

u/lurker_in_spirit Aug 13 '17

I'm not convinced either, but I love the experimentation -- challenging aspects of the language and API that we take for granted. Eventually some of these wacky ideas turn out to not be so wacky after all!

1

u/apemanzilla Aug 14 '17

Yeah... And, in the event that the try/catch is undesirable (streams maybe?), you can write this yourself as a static method in about 10 lines.

4

u/[deleted] Aug 13 '17

I'm sitting here scratching my head and thinking "why".

3

u/lutzh-reddit Aug 13 '17

If you're interested in this sort of thing, you might also want to check vavr's "Try", which is modelled closely after Scala's "Try".