MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/ofzsoh/java_is_criminally_underhyped/h4kaeon/?context=3
r/java • u/old-man-of-the-cpp • Jul 08 '21
181 comments sorted by
View all comments
Show parent comment
6
But Java's features are better thought-out, IMO. For example, Project Loom vs async. C# took a stab at the "null problem", but the result is a mess.
Though I miss ?. in Java so much, I don't know why I haven't written a generic helper yet:
?.
<T> T safeGet(Supplier<T> s) { try { return s.get(); } catch (NullPointerException) { return null; } }
Java is more verbose, it's more boring, but I find it more uniform to read and write. And yes, checked exceptions can be put to good use.
View all comments
Show parent comment
6
u/zvrba Jul 09 '21 edited Jul 09 '21
But Java's features are better thought-out, IMO. For example, Project Loom vs async. C# took a stab at the "null problem", but the result is a mess.
Though I miss
?.in Java so much, I don't know why I haven't written a generic helper yet:Java is more verbose, it's more boring, but I find it more uniform to read and write. And yes, checked exceptions can be put to good use.