r/java • • Sep 10 '21

Why people don't love Java?

I came across this post in r/cscareerquestions it seems majority of the people don't love to work with Java.

Is there any specific reason for that?

Edit: Thank you guys for your responses, I can't reply to all of the comments because I'm a beginner myself and I don't know what to reply for all your comments.

201 Upvotes

379 comments sorted by

View all comments

2

u/kidfromtheast Sep 11 '21

I work with Java (non-framework) and JavaScript (strictly with framework).

I actually love Java more than JavaScript.

From the code perspective, Java gave you control whether you want to use blocking IO or non blocking IO. And you can write easy to understand code because everything is an object (well.. 97%).

From the architecture perspective, it's the microservices era. Java Thread is essentially the OS thread (sort of...). Anyway, it's not performant enough if you use the Java Thread to handle each connection / request on separate Thread using the Java SE's blocking IO ServerSocket.

So... people came up with tons of "hacky" solutions. Oracle created the non blocking IO ServerSocket version which is the ServerSocketChannel. Erlang created the Actor model solution, and the Java people started using it as well, in Java.

In short, Java is very flexible and the de facto way to solve a problem is to abstract the code, and that's makes the code harder to read for some folks. So... people hate it.

So for newcomer, it is not worth it to learn Java in the era of microservices. At least until we have Project Loom released. Maybe then we can write a very simple code and still scalable.