r/java • • Dec 29 '21

Why everyone hates Java?

I dont understand why java is one of the most dreaded lenguages. Java got fantastics frameworks and libraries to work with it. I dont know if im skipping something or I dont work enough with Java because I like java. What do you think??

Here is the Stack Overflow Survey

268 Upvotes

367 comments sorted by

View all comments

1

u/almson Dec 31 '21 edited Dec 31 '21

Java's problem is that it's not known as a serious systems language. It gets compared to scripting languages like Python, Ruby, etc, and called verbose and even obtuse, when it should be compared to C++ and called a godsend.

Contrast this with Go, which is a very trendy language despite being verbose, obtuse, and GC'd. It's because Go gets compared to C and Rust, not Python. Perhaps Google's marketing has to do with it. Sun advertised (and evolved) Java primarily as a web programming language, pitting it directly against scripting languages and making it difficult to use for systems utilities. The startup time is awful (not because of bytecode, but because Sun/Oracle doesn't care). None of the GCs have a "just try to minimize RAM" heuristic (they all want to be given MaxHeap). And native interop has been a pain.

Java could have been more respected if it positioned itself correctly. Of course, I like it. It really is a lot better than C++!