News for hackers. Stuff that matters.
Re:The Case Against OOP Is Wildly Overstated by hinkley on Friday July 31, 2020 @03:09PM (#24012618)
Not just invariants, covariants as well.

State and zip code always change together. Having had to fix code that passed 5 variables around for an address (which needed to go to 6 for “address 2”) I replaced it with an address object.

Re:The Case Against OOP Is Wildly Overstated by lmm on Friday July 31, 2020 @09:53PM (#24016633)
An address datastructure is a good thing. I'm not at all convinced that an address object - one with behaviour - is.
Re:The Case Against OOP Is Wildly Overstated by umanwizard on Saturday August 01, 2020 @11:10AM (#24021026)
You can have an address struct, and functions that manipulate it in controlled ways (like always updating the state when the ZIP changes), in every language, whether OOP or not.
Re:The Case Against OOP Is Wildly Overstated by HeyLaughingBoy on Saturday August 01, 2020 @12:10PM (#24021537)
That is OOP, regardless of what the language is.
Re:The Case Against OOP Is Wildly Overstated by umanwizard on Saturday August 01, 2020 @02:17PM (#24022667)
It’s an OOP technique, yes, but functions operating on structures predate OOP and are used in practically every program, so they’re not enough to claim that a program is written in OOP style without the term losing all meaning.

For me, true OOP requires some sort of inheritance and/or runtime method dispatch, at least.

Re:The Case Against OOP Is Wildly Overstated by HeyLaughingBoy on Sunday August 02, 2020 @01:15PM (#24029956)
OK, I'll go along with that. The description given doesn't contain a full "implementation" of what OOP is considered to be.

Can we at least agree that limiting operations on the structure to the code that controls that structure is following the definition of encapsulation, which is what I should have said anyway?