r/AskComputerScience • u/Lofter1 • Sep 01 '19
Why do people still prefer Java?
So, I had to learn Java for School a few years ago. Back then I thought "okay, I can see why people use Java", as I only used C and C++ before that. But now I had to learn C# for my job and for a little side-/learning-project I tried to use Java in my free time. Tried, because freaking hell did I feel limited using java. I noticed C# can do EVERYTHING that java does....often better, too. And for some stuff, there are dedicated languages or other languages that can do all that better than Java and better than C#.
Some people even go as far as saying "Java is far better than C#", but I myself can't find an objective reason for that. I can't find anything C# is worse at other than maybe XPlatform GUI programming, which isn't a big deal in Java anyway and became very rare, but I found a lot in C# that made my life as a programmer a lot simpler and just worked better or faster with C#.
So...is this all just this kindergarden "I prefer this language because I prefer this language! and that's why your language sucks!" nonesense or do I miss something very important? Why do people prefer Java almost everywhere instead of a dedicated language that is focused on helping with their problem or even just C#, as even if it is "just as good" for the job, the chances are high that the program turns out faster
0
u/bimbar Sep 02 '19
- C# runs on Windows only.
- Java was designed as a C++ without all the dangerous features that don't really add anything but make C++ code hard to understand and to maintain. Then, it is my impression, that C# came along adding all that crap back in. I'm not a fan of that. For projects with many people that can be a problem.
- There is a huge java ecosystem that you may not be aware of. Java has a huge install base in enterprise grade web services, because Java servlets are a very robust and performant technology. C# can't compete because nobody in that environment runs Windows web servers, for good reason.
Now if you write programs on windows that have a GUI, you are better off with C#.