I've been programming Java since 1998 or so, and this may be surprising to some on here - but I still like it!
Here are the upsides in my mind, and as with all these things keep in mind - nothing's perfect! Everything has tradeoffs and I am making no absolute statements. Anyway, in no particular order:
- Performance. It's possible for Java to be within 50-98% of the speed of even the most hand tuned native code, which is pretty remarkable considering the language comforts it provides.
- Backwards compatibility. I have code that's 15 years old I still use. Programming hasn't fundamentally changed _that much_ in the past 20 years, but a lot of other languages act like it's changing by the year or even month. I deeply value not spending time fixing breaking language changes or dependency problems (for the most part).
- OOP. I know we're in the cycle now where "OOP is a failure," but that's just wrong. Just like it was wrong when "OOP was the solution to everything." I don't go crazy with it, rarely use inheritance, use interfaces only occasionally, but do find it's nice to keep myself organized in terms of scope of code and responsibilities.
- Typing. I know it's not perfect, but I really lean on the type system in Java. I think this might be because I'm a bit of a messy programmer to be honest, so this helps me keep a handle on things. When I work in Javascript I find things getting out of control quickly, whereas I can make statements about the entire codebase in Java that help me stay on track.
- Tools. I've been using Idea as an IDE for 15 years or so and it feels like an extension of my mind. I can't even remember what the keyboard shortcuts are anymore, I just do them. It really helps keep the focus on the problem at hand rather than the details of implementation. We're finally coming out of the "IDEs are bad" cycle so I see more people using them again, that's good for everyone.
- Simplicity. One major thing that people have forgotten with Java is that you can write simple code with it. It feels like the number one complaint is over engineered "AbstractFactoryImpl" codebases, and I hate those too. But it's also possible to write simple, easy to follow, understandable code.
- Exceptions. I used to hate these too, then I had to write some code that _really had to work and handle everything_ and suddenly they were pretty nice.
In terms of downsides:
- It's pretty bad for scripting. A lot of that could be fixed with extensions to the standard library that provided easy helper methods. We shouldn't be constructing URL objects for anything, just do it. I'm very jealous when I see a nice Python script for doing something with data from an API.
- It does tend to want a lot of memory. This isn't as much of a problem anymore thanks to Moore's law, etc.
- Library support for new services. People tend to write a Javascript, Ruby and Python library for everything, which is super nice. Java is not as common these days.
- Some other stuff I'm probably forgetting right now, I'll update this if I think of anything else. As I said, nothing's perfect.
And in a general note: Don't underestimate the power of true expertise in a language. I find that in a lot of the cases when I'm reading about something new, it's hard for any upside to overcome deep experience. In that way, the best language for anyone is probably the one they know best, so maybe I'm biased.