Java has a culture of fully drinking the OOP coolaid. It also has a lot of outdated stuff in the language, this is made worse by a lot of places using outdated versions.
Using Java's more recent versions and using OOP as a tool in your toolbox, rather than the end-all be-all, Java becomes a completely fine and portable language with mature tooling.
Java to me is completely unremarkable. Not too fast, not too slow, no novel concepts. Just a language with generics, OOP and a garbage collector.
Using Java's more recent versions and using OOP as a tool in your toolbox, rather than the end-all be-all, Java becomes a completely fine and portable language with mature tooling
This, right here, is how I use the language. I think that regardless of how you feel about OOP as a whole you probably hate inheritance when it's used too much. Definitely the tool added by OOP that should be used sparingly.
OOP has the side effect that the IDE knows the structure of the app and can refactor it every which way. Whereas on the other end of the spectrum, with the dynamic nature of JS and Python the IDE can't be sure whether the objects' structure is modified at runtime and thus what's referenced by any identifier.
P.S. JavaScript coders have the habit of saying that IDEs are unnecessary, which is probably because they never saw the extent to which the IDE knows about a non-dynamic language.
Maybe Javascript is a bad comparison, but I don't see that as any worse than JS passing a couple dozen parameters through multiple files which I'm seeing regularly these days. Huge pain in the butt when I'm trying to find where something is actually managed or used. Maybe my company just has bad JS code though.
They may be inside. But you can write JS and Python without ever bothering with organizing code into OOP, whereas you can't with Java. That's what matters for the IDE.
Also, JS objects are more of glorified maps that have some conventions for handling calling of methods — same way as with Lua tables.
I think your point about it being sorta a middle of the road language is why it's so popular. I mean, it being one of the earlier "run anywhere" languages was huge, but Java also hasn't changed that much since its inception. We've got new features but they use the ugly java verbose syntax, making it feel like it's not as modern as it is.
I didn't realize people didn’t like oop. This explains why js libraries are so weird then. They'll do anything to avoid creating a contained, portable model with packaged functions. It's like no one really even paid attention in college or just went to 6 month programs where they tell you mvc is god and must not be questioned, even though no framework follows it completely.
OOP is a tool that basically gives you infinite opportunity to abstract. This is not healthy for all situations. It can abstract into the "wrong direction".
As a data oriented design enjoyer, I'm more fond of the ECS pattern, which usually means my classes usually don't do much inheritance, if any, and their methods are just operations on their data, with no other side effects, or simple query methods, who's result only depends on the contained data. This design philosophy allows for encapsulation, but doesn't really need liskov substitution, it also makes managing memory easy, which makes OOP (builtin vtable support) and garbage collection kind of moot points imho.
I'm not claiming this is one-size-fits-all (kind of unwieldy for large, unique, and heterogenous datatypes), but it's a nice and efficient pattern for a lot of cases.
People hate Java because it forces OOP on you and it's quite verbose.
However what I find very funny is that mature codebases using mature programming languages trend towards Java-esque syntax and paradigms anyway.
When JavaScript, which at the time had one of the most anti-traditional and anti-OOP programming communities, came out with Typescript and everyone fell in love with it, that said everything you need to know about how unfamiliar a lot of people are with the stuff they allegedly hate.
But then again most programmers form their opinions about tools based on nothing but a single to-do app so this shouldn't really come as a surprise.
Apart from enums and interfaces, it's at best ugly and at worst confusing, verbose and clunky and often unintuitive to use. It's also frustrating to configure properly at times.
It's also slower than C (and its derrivatives) due to running on a VM.
It is no longer the most ergonomic language for its designed use cases.
Especially, not enterprise Java. C# is significantly more ergonomic for that application. C# also has a lower skill requirement, if you realize you can train Systems Engineers/Admins on it by making them use it in their PowerShell scripts (PowerShell can embed and interact with C# and the C# type system comparable to the way that Python can interact with C/C++/Rust through ctypes)
If you would like proof, I'm a former sys ad. Look at the first 2 badges in my flair.
154
u/Rebrado Jun 12 '25
What is with all the Java hate?