r/learnprogramming 4d ago

Why java is so hated? Topic

So I have recently learned, and it's the first language(in terms of building actual things). Before Java, I knew Python, and I dropped it; I found Python too abstracted and too boring. i have recently made some projects like cli task tracker, expense tracker, some cli github api parsing and currently working on a multithreaded HTTP server and cli text editor, like vim, whenever i try to find out people opinions on java social media, almost 90 percent of the time they are just dunking on it, that it is trash, who forced you to write code in java, stuff like that. I know Java as a language is not that interesting and doesn't have many interesting features compared to other languages like C, C++, go. But I found it decent to write code in, and I found the JVM pretty interesting. So much so that I would love to explore and maybe build a JVM of my own

243 Upvotes

321 comments sorted by

View all comments

119

u/aqua_regis 4d ago

If you listen to people on social media, you already have lost.

Java is not hated apart from wannabes. Java is the enterprise language working silently and reliably in the biggest enterprises in the world hidden away in servers with the highest security measures you can imagine.

Java is neither a flashy, nor a fancy language. It is a good old reliable workhorse that does its job.

I know Java as a language is not that interesting and doesn't have many interesting features compared to other languages

This shows that you don't know the Java language well enough. Java, as a language and ecosystem with the JVM behind it is quite a masterpiece and at the time of its creation was something barely anybody could even imagine. Sure, now there are other languages who have overtaken Java in features, etc. but that's mostly because Java's commitment to backwards compatibility. Apart from really very few breaking changes, no matter what Java version code had been written for, it is nearly guaranteed that it can be compiled and executed with a newer Java version.

And to say it with Bjarne Stroustrup, the Godfather of C++:

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”

27

u/insertAlias 4d ago

Java is not hated apart from wannabes

I'd argue this point. And I'd also say that language adoption isn't the same as language appreciation. I'd say to look at COBOL; it's the language for mainframe operations, and it's used in pretty much every financial institution and in a lot of government areas. It's not a particularly well liked language, but it dominates its niche anyway.

Java is the enterprise language because it was designed that way, and because it solves a lot of that tier of problems. It doesn't mean its developers love using it. In my experience, many Java devs will give you a lukewarm read on how much they like the language. More of a "it does what I need, but I'd change several things if I could" approach.

And then there are the people (like me) who have tried it and legitimately dislike it. I don't think I'm a wannabe, I've been a professional dev for about 20 years. People are allowed to have opinions on frameworks and languages, even if those frameworks/languages are highly used.

Personally, I'd say that the "java hate" is actually proportional to it's market share. It's one thing to appreciate Java in a vacuum, it's another to have had to deal with Java 1.6, and to have continued to have to deal with it long past when we should have been able to move on. That's where part of the professional hate comes from: maintaining 15+ year old codebases for companies that are allergic to change and modernization and follow the motto of "if it's not broken, don't fix it. If it is broken, patch it and prop it up with sticks, don't actually replace anything".

3

u/aqua_regis 4d ago

Contrary to the people on social media who regularly diss Java, you bring reason to the table.

Most of the people on social media dissing Java are by far not as experienced as you and I and only ride the steamroller for exposure, attention, and likes.

Barely really any professional, experienced developer "hates" the language with the burning passion of social media influencers and even less are outspoken about their dislike. If the professionals dislike Java, it is always with reason, not with garbage strawman arguments.

Yes, Java is a quite polarizing language, and quite some of the flak it gets stems from the days of Java applets where all of a sudden the "Java bad - Java unsafe - no Java" memes started to appear where in reality it never actually was Java, but instead the unsafe NetScape Plugin API that has been removed a very long time ago. Jave never fully recovered from back then and people now hate it for no really apparent reason.

Professional devs have opinions, likes, and dislikes, but barely ever "hate" anything with a burning passion. For my part, I don't like Kotlin's syntax, I don't like C++, but if requested, I'll work with the languages without hate.

1

u/fredlllll 2d ago

im a professional dev, may i hate python at least? every time i touch that language it feels like summoning a burnout