3 ms·
Considering mainstream languages, I find java unique in forcing OOP into places it doesn't really belong. You can see this in your first "hello world" applicati
by StillBored 6y ago
Considering mainstream languages, I find java unique in forcing OOP into places it doesn't really belong. You can see this in your first "hello world" application where the entry point ends up getting wrapped in a class definition. Something that makes zero sense, and does little but obfuscate. I tend to like a bit of OOP here and there, but the little java programming i've done, it always feels like I was forced into pounding the square peg into a round hole.
https://www.programiz.com/java-programming/hello-world https://www.programiz.com/java-programming/hello-world
Compared with say, C++ where you can write entire programs that never declare a single class. Its the same thing with purely functional languages, in any significantly large program you reach the point where your solving problems using the wrong paradigm because the language is too dogmatic.
- Nursie 6y agoHaving an entry point in a class lets you have per-class entry points, so you can choose what to run, if that appeals to you. Java likes its objects, but in modern java there's enough in the way of lambdas etc that most of the weird "this must be a class" stuff is removed, or at least hidden. And the java community are far less dogmatic about it these days.
- WalterSear 6y agoHowever, the author is specifically longing for the old Java, and the halcyon days of trying to object orient everything. It's not a blog piece: it's a cry for help.
- nradov 6y agoThere are multi-paradigm languages like Scala which address that concern, at the cost of higher complexity.