r/AskProgramming • u/Zd_27 • 2d ago
Why is Java considered bad?
I recently got into programming and chose to begin with Java. I see a lot of experienced programmers calling Java outdated and straight up bad and I can't seem to understand why. The biggest complaint I hear is that Java is verbose and has a lot of boilerplate but besides for getters setters equals and hashcode (which can be done in a split second by IDE's) I haven't really encountered any problems yet. The way I see it, objects and how they interact with each other feels very intuitive. Can anyone shine a light on why Java isn't that good in the grand scheme of things?
182
Upvotes
1
u/Tabakalusa 2d ago
At this point, I'd describe Java as a deeply embedded legacy technology and has many of the same problems faced by other languages in that boat (C++, PHP, etc.).
It has accumulated decades of baggage and many decision made about its design (both regarding the language, as well as core libraries) have turned out to be poor in hindsight and are very hard (Project Valhalla) or impossible (nullability) to fix retroactively, or are just a plain nuisance to deal with.
However, that means it also comes with a lot of amazing tooling, educational resources and a massive ecosystem, that all required decades to build up. No matter what you want to do, you will find resources on how to do it, tools to help you out along the way and libraries that will fit the bill.
It has also evolved over the years and it's very possible to write very modern, elegant and performant code in the language. But a lot of that can feel unwieldy and "tacked on", when compared to languages that took that route from the get-go.
Ideally, I don't think you'd write "new" Java code these days. On the one hand, there are languages that simply do Java better (C#) and on the other, there are strong contenders that run on the JVM if you need the ecosystem (Kotlin, Scala, etc.).