Medi Madelen Gwosdz' OOP take

I ended up finding this post discussing OOP in several threads today. It's by Medi Madelen Gwosdz, "If everyone hates it, why is OOP still so widely spread?". In this post she keeps discussing, well, 3 pillars of OOP, the fourth missing pillar was the abstraction but people seem to keep missing that one, I saw a training video that also had dropped abstraction. Important thing to take-away from this post is that OOP criticism is easily hyperbolic and OOP comes with values that are worthwhile to mention.

Medi tells that there's maybe no need to choose between OOP and FP. I can tell that it's no need to choose during the next decade and the transition wherever eventually it happens is going to be smooth because many newer FP languages run on familiar dynamic language runtimes. This was actually what may have been intended from the beginning. Runtimes such as Python or Javascript are perfect for building pure functional or logic programming environments. Not only that but a common neighborly runtime allow functional programming languages to be compatible with future implementations of similar languages.

  1. Abstraction may have been lost in OOP promotional material because functional programming outright does it much better. That's why that pillar seem to be missing now and it's understandable. Nothing can beat mathematics and equational reasoning in how abstract it can be.

  2. Medi notes correctly that encapsulation is a good feature in OOP, but it can be implemented in other ways. Functional programming languages have existential types (∃) that allow mathematically solid encapsulation.

  3. Inheritance is correctly covered in the article, the goal this feature has, is recognized to be DRY, though I'm not sure it's the only goal with inheritance. I think modeling of structures through categorical hierarchies is a big rational for inheritance.

  4. Polymorphism is recognized by Medi as a way to function in presence of complexity. The quality of polymorphism greatly influences software correctness.

We likely won't talk about pillars with functional programming, but you better notice that these ideas aren't left behind. This may be the stuff that OOP got right and the implementation was a product of its time.

A recipe for total distortion is ready when a technique is applauded while the motivation behind it gets forgotten. I think that OOP was soured by numerous consultants who tried very hard to make themselves look better.

If you take it as a problem that consultants mangle knowledge, the fix to this problem is easy. Lets make it so that those consultants feel no need to be recognized, or are otherwise not motivated to work toward being recognized. The easiest way is to make people feel recognized. Recognize and validate people for things they get correct, it may also help to not hold judgments that are final.

Similar posts