News for hackers. Stuff that matters.
Re:Java Language Update – a look at where the language is go... by Pet_Ant on Sunday June 02, 2024 @05:45AM (#40552797)
I think that is more descriptive and less prescriptive.

I’ve never seen a codebase ever really use OOP in an enterprise setting. Just spaghetti and meatballs architecture. Meaty god objects “services” with long strings of structs.

Re:Java Language Update – a look at where the language is go... by belter on Sunday June 02, 2024 @06:45AM (#40553038)
> I’ve never seen a codebase ever really use OOP in an enterprise setting

What!? Did you look at the source code of Chrome, QT, even Java JDK, SAP, Adobe, WebLogic, WebSphere....and so on...and so on...What kind of enterprise setting are we discussing here?

Re:Java Language Update – a look at where the language is go... by Pet_Ant on Sunday June 02, 2024 @11:21AM (#40554877)
The code that uses those frameworks often works with turns into spaghetti and meatballs. Spring has real OOP, but code that uses Spring turns into DTOs and repositories and services.
Re:Java Language Update – a look at where the language is go... by usrusr on Sunday June 02, 2024 @06:14AM (#40552902)
That's because that happy family of business logic living in with state envisioned as a savior in the Smalltalk days turned out to be a hot mess. Information hiding does not magically make problems go away, in particular not when code isn't "write once and don't ever touch again" and state outlives code iterations. OOP has been a great contribution to how we organize code, but its principles are best applied in moderation. It's quite mindboggling to see how many people still believe they are followers of the OOP ideals when in fact they have long moved on.
Re:Java Language Update – a look at where the language is go... by lenkite on Sunday June 02, 2024 @06:45AM (#40553041)
Maybe you could clarify what OOP means to you ? There are lots of successful real-world OOP frameworks which have solved lots of problems.
Re:Java Language Update – a look at where the language is go... by igouy on Sunday June 02, 2024 @11:19AM (#40554858)
With getters and setters as default whither "information hiding".
Re:Java Language Update – a look at where the language is go... by Pet_Ant on Sunday June 02, 2024 @11:23AM (#40554887)
How people think that code is OOP when it has setters and getters, especially when then don’t do any validation is beyond me.

It’s just transaction scripts.

Re:Java Language Update – a look at where the language is go... by sirwhinesalot on Sunday June 02, 2024 @05:55AM (#40552840)
"You just didn't do OOP right."

Everytime.

Re:Java Language Update – a look at where the language is go... by zbentley on Sunday June 02, 2024 @07:36AM (#40553258)
See also: Agile, the word “political”, Big Data.
Re:Java Language Update – a look at where the language is go... by lenkite on Sunday June 02, 2024 @06:48AM (#40553049)
> I’ve never seen a codebase ever really use OOP in an enterprise setting.

I have seen lots of them. Fairly maintainable ones too for that matter. With minimal spaghetti code.

Re:Java Language Update – a look at where the language is go... by baq on Sunday June 02, 2024 @06:02AM (#40552863)
> I’ve never seen a codebase ever really use OOP in an enterprise setting.

That’s a very strong hint OOP does not solve any problems better than alternatives.

I think this is something programmers understood for a very long time but either didn’t care or didn’t have the tools to do better. Then go and typescript came along and showed the world that indeed structural typing is in practice better at almost everything, except perhaps GUI libraries. Maybe.

Re:Java Language Update – a look at where the language is go... by ivan_gammel on Sunday June 02, 2024 @06:46AM (#40553042)
„Better than“ was never going to work for any paradigm. What actually works is „better together“, with a healthy mix of OOP, FP and SP.
Re:Java Language Update – a look at where the language is go... by Pet_Ant on Sunday June 02, 2024 @12:10PM (#40555211)
> That’s a very strong hint OOP does not solve any problems better than alternatives.

It also requires more conceptually out of developers. I cannot count the amount of times I was on a team with developers that when implementing an interface never created a method that wasn’t one of the publicly required ones (ie no helper methods).

Re:Java Language Update – a look at where the language is go... by marginalia_nu on Sunday June 02, 2024 @09:14AM (#40553840)
I think it depends on what you mean when you say OOP. I agree with the statement that OOP as it's taught in a text book with heavy emphasis on modelling the domain with deep inheritance taxonomies and polymorphism, that is largely a methodological cryptid.

These are tools that are relatively rarely used in Java. Not that they aren't ever done or used (anyone using almost any of Java's own APIs is knee deep in this), but the emphasis is in application code is typically on state-light services and immutable models. Not that I quite understand what is the problem with that.

Re:Java Language Update – a look at where the language is go... by vbezhenar on Sunday June 02, 2024 @09:51AM (#40554114)
OOP failed to deliver its promise. So people just use what's reasonable: split state into one structure and handlers into another namespace. So-called anemic model. Which is the only sane way to build software.
Re:Java Language Update – a look at where the language is go... by jajko on Sunday June 02, 2024 @10:09AM (#40554263)
Especially if you count in 10-20 years of maintenance, bug fixes and small and bigger changes happening by various folks of various skillset and approaches.

KISS ruled, rules and will rule above it all.