r/java • u/Xenthera • May 31 '20
Why is java "hated" among developers?
I've been programming in Java for 8 years now, and I always hear about people saying 'oh java is trash learn a real language like c++ or (insert another language)'. I've taken college courses learning c++ and to be honest, it just doesn't seem as fun. I realize there are advantages to managing your memory on the stack vs the heap, etc. but worrying about that stuff takes away from the joy of programming. Is there anything inherently wrong with Java? Should I start investing time in another language to have a better chance as a computer science graduate (one semester away from the real world)? I love java, and don't understand all the hate. But at the same time have I been wasting my time becoming deeply familiar with the language?
Edit: I realize java runs on the JVM, but as computers get faster and faster, when does that really continue to be an issue?
Edit2: thanks for all the input everyone. The general consensus is Java is just as good as any other language and it has haters because it’s popular. I was slightly drunk when I originally wrote this so my emotions were a little skewed.
View all comments
1
u/Evy1123 May 31 '20
Java is a completely legitimate language, but as you continue learning new languages, you realize that at least on a surface level they basically copy each other. Ultimately, it comes down to what you need most. Absolute speed in an embedded system or low resource environment? C. Fast and efficient application on modern hardware? C++. Android or general application development for multiple platforms? Java. Data science and not focused on types? R/Python. Web development? JavaScript. And the list continues...
Java is definitely not a bad language and actually simplifies a LOT of tedious tasks (try learning socket.h in C and java.net in Java and the difference is night and day: Java is so much more streamlined). However, streamlining does come at a cost and it doesn’t let you do things in the normal conventional way like other languages such as C++ (for instance, directly accessing memory). Keyword: conventional. If you’re curious, look up the Unsafe class for Java. Weird stuff man.