5 ms·
You brought up the worst part of OOP, inheritance. Which most modern OOP rarely uses. Since the 90s “composition over inheritance” has been a mantra. If you wan
by jackblemming 4y ago
You brought up the worst part of OOP, inheritance. Which most modern OOP rarely uses. Since the 90s “composition over inheritance” has been a mantra. If you want to build strong arguments, focus on real issues. Not incompetent programmers abusing inheritance or abstract factory factories, because they can write just as awful code in functional programming. There are plenty of actual OOP issues to hate on, but that’s because there is no silver bullet.
- zasdffaa 4y ago> ...inheritance. Which most modern OOP rarely uses huh?!
- akavi 4y agoWhat is OOP today in practice if inheritance is dead, as you say, and mutability is out of style, as I've notice in all of the codebases I've worked on since ~2014? It feels like we're just left with a heavyweight syntax for structs + functions bound to data, which feels like pretty thin gruel.
- wjmao88 4y agoWhat are things that are OOP specific (as in not used at all in FP) other than inheritance?
- JackFr 4y ago> Since the 90s “composition over inheritance” has been a mantra. That seems a little early. I think the 90's were still pretty inheritance-centric. Java only came out in 1996. UML 2.0 was releaeased in 2005. I'd say the composition over inheritance movement wasn't widespread until the 2000's,
- jackblemming 4y ago>[Composition over inheritance] is an often-stated principle of OOP, such as in the influential book Design Patterns (1994)
- JackFr 4y agoYou are absoultely right -- p. 20 "Favor object composition over inheritance", right in the introduction. I guess my memory was wrong (or I was hanging around the wrong crowd in the 90's.)
- wasifbaig 4y agoWhat are the real issues in OOP? The concept of composition has long been the bread and butter of functional programming paradigm since antiquity. OOP just adopted it later in the wake of nightmare inheritance hierarchies.