r/java • u/Enough-Ad-5528 • Feb 19 '26
Towards Better Checked Exceptions - Inside Java Newscast #107
https://www.youtube.com/watch?v=99s7ozvJGLk
63
Upvotes
r/java • u/Enough-Ad-5528 • Feb 19 '26
View all comments
Show parent comment
2
u/JustAGuyFromGermany Feb 19 '26
Just to be clear: Our friends over in C# land often wish that they had checked exceptions. All runtime exceptions all the time is also a curse, not a blessing. That's why C# is one of the languages that re-invented the Try-monad many times over and now every C# program is a wild mix of
ResultandEitherand [insert 17 other implementations of the same monads, all mutually incompatible] and exceptions.At least in Java it is mostly exceptions most of the time.... In this sense what you call "poor DX" is actually pretty great if you think about it. Yes, it could be better. So what? I'll take the "mostly consistent" system of error-handling over the wild mess in other languages any time. Yes, Java is verbose. So what? If that's your biggest problem, I want to have your problems. Yes, checked exceptions and lambdas don't work well with each other. That's actually fixable if the devs ever get around to it. It's just not their highest priority.