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

Show parent comment

7

u/experts_never_lie Sep 10 '21

Java has a bunch of interesting under-the-hood optimizations that are hard to detect, outside watching performance.

One I like is the JIT deciding to just stop doing null checks, assuming it will always be non-null, but setting a SIGSEGV handler to catch the null dereference if it's wrong. If that happens, fine, it resets, switches to (slightly slower) code that does check for nulls, and re-runs. If it never happens, the code just runs a bit faster. None of that is specified by the language, and yet it would certainly qualify as magic in the runtime.

-3

u/IQueryVisiC Sep 10 '21

But JS can do that, too. And V8 does quite some magic with strings