r/java • • 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

379 comments sorted by

View all comments

542

u/thomascgalvin Sep 10 '21

The people posting to that sub are typically young, and probably have more experience with Javascript than anything else.

Compared to JS, Java can feel heavy and constricting. Lots of boilerplate, a type system that's strictly enforced by the compiler, and so on.

It isn't until you have some real-world experience, with code spread out across dozens or hundreds of files, that you realize the "limitations" of Java are actually meant to prevent you from blowing your own foot off.

13

u/Danelius90 Sep 10 '21

I think another issue can be a lot of "java devs" can't code in java for shit. If you write procedural code, loads of static methods, no consideration for OOP and just use Object, String and arrays everywhere rather than define your own types then you're going to have a bad time. We work with a third party at my company and the way I describe a lot of their code is tutorial level. You can tell because it looks like code taken from a blog post in 2006

8

u/vips7L Sep 10 '21

I personally think this is all devs in every language. There is shit code every where. I’ve seen procedural crappy code from go/python/js/rust devs. You name it someone’s written crap in it.

Java is just super well adopted and everyone thinks they know it so you get a ton of people who don’t know what they’re doing writing it.

2

u/Danelius90 Sep 10 '21

Yeah I agree. As you say java is widely adopted so a lot of devs have probably seen bad stuff in java. Java does have a rep of being clunky and verbose, and I do think this is particularly true of it if you code in the way I described. For some apps javascript can be quite efficient when written, but poor JS code suffers from really difficult bugs that some of java's features help mitigate if done properly. But it's swings and roundabouts, every language will have strong and weak points and depend a lot on the dev writing it!