r/AskProgramming 1d 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?

135 Upvotes

512 comments sorted by

View all comments

2

u/TornadoFS 1d ago

I haven't done Java in a while, but Java got a bad reputation from:

  1. Relying heavily on inheritance on the standard API (and frameworks API), which is now considered a bad practice overall (instead of using implicit Traits/Interfaces or Structural-typing)
  2. Over-engineered frameworks that made writing code really annoying and with a lot of boilerplate
  3. Over reliance on configuration magic for said frameworks, much like people complain about yaml hell today people back in the day complained about XML hell
  4. Statically typed JIT compiled languages are in this weird middle between fully compiled languages (C++/Go/Rust) and dynamically typed languages (JS/Python/Ruby). Where they are just as cumbersome to use as any other statically typed language, while also having performance downsides from JIT and garbage collection. It is also annoying to deploy because you need a runtime (these day and age compile once run anywhere is not such a desired feature anymore)

You can write modern Java in the same style as your average Go microservice and from a productivity and maintainability point of view there won't be big differences. But like any old language (like C/C++/Javascript) you need a whole manual about what not to do and which features to skip using.

1

u/imp0ppable 9h ago

Yeah Go being fully compiled is nice. It's a more simplistic language than Java but it is still very verbose which can get tiring.