Why does Java get such a bad reputation as a programming language? Why has it been described as a horrible language? 

My creeds


: I’ve worked with Java since 1998 and written 3 books that heavily involve Java.

First, the positives of the Java ecosystem:

  • the JVM
  • the vast amount of tooling available (IDEA, e.g.)
  • the vast amount of libraries written for it
  • being strongly typed allows for great automated refactoring support
  • finding developers is pretty easy

There are a number of good things in the language itself; for example typesafe enums and the single inheritance model (as opposed to MI in the predominant language in 1995, C++).

From the negative side, it’s old and bloated. It’s bloated because they’ve insisted on backward compatibility over just about everything else, and because they started with a pretty simple and somewhat ineffectual language in 1995. That’s a choice, and for some folks a good one. But partly as a result, there are so many ways to do anything (concurrency, for one example). The java.util.Date class still exists from version 1.x, and yet is largely deprecated. This bloat creates additional effort in a number of ways.

Worse, some of the mechanisms to support backward compatibility are awkward and create their own problems. The canonical notorious culprit is erasure, introduced in Java 1.5 to support generics. Generics in Java is a fairly complex beast—take a look at Angelika Langer.

’s FAQ for a sense of the complexity & limitations involved, partly as a result of erasure as the implementation choice.

I was happy when streams & lambdas came along in Java 8, to see that the language was finally catching up with most other major languages out there (IIRC it came out *after* C++ introduced lambdas in Cx11). But the need to first request a stream from a collection and then (usually) collect back to something else just bloats the code.

I have many, many more examples of small irritants in Java; too many to list. Lots of little irritants add up to an often tiring day. I’m still able to get my work done, but Java work is considerably slower for me than work in most other languages—with the exception of maybe C++.

Every language has warts and irritants; the languages I prefer to work in (Python, Ruby, Clojure, Kotlin, Elixir, and maybe even C#) have fewer than Java (and a lot fewer in some cases). These languages also generally support producing code that appears far more concise and elegant.

Comments

Popular Posts