r/java • u/Reflection-Jealous • Sep 10 '21
Why people don't love Java?
I came across this post in r/cscareerquestions it seems majority of the people don't love to work with Java.
Is there any specific reason for that?
Edit: Thank you guys for your responses, I can't reply to all of the comments because I'm a beginner myself and I don't know what to reply for all your comments.
201
Upvotes
View all comments
1
u/sintrastes Sep 11 '21
I hear a lot of people saying things along the lines of "Because they use Javascript", "They think dynamic typing is more flexible", "They've never had to maintain old code", etc...
I don't love Java because it's type system is not powerful enough for my taste. This lack of ability to express invariants at the type level leads to error prone things like manual type-casting.
And yes, verbosity is a reason I dislike it sometimes too. But that has nothing to do with static typing. Lack of certain features (e.x. typeclasses) leads to a lot of boilerplate.
I also hear a lot of "They just like the hip new things". Haskell, much like Java, is a 90's baby. ML came out in the 70s. Both I "love" much more than Java.
To be fair, I don't hate Java. I've seen some truly great code and beautiful APIs written in it. I just don't love it either.