2 ms·
Disagree entirely. OOP is 'widespread' because it is frankly a very powerful (and obvious) way to encapsulate and organize information and function by breaking
by jariel 6y ago
Disagree entirely.
OOP is 'widespread' because it is frankly a very powerful (and obvious) way to encapsulate and organize information and function by breaking down said problems into digestible units or 'mini modules' if you will, that also happens to lend well to how humans interpret the world.
Polymorphism is a very powerful tool for adaption.
Far from 'problems at scale' - it's the complete opposite: well designed OOP is generally the best abstraction to use at scale, to the point wherein most of the world's most comprehensive APIs are in fact OOP.
Inheritance is definitely overused, and OOP is not ideal for many kinds of projects, but overall, it's successful because it's extremely useful.
It's 'mid level' Engineers, those who have discovered the foibles of OOP Orthodoxy, who 'develop their own ideas for the first time' who are the most ardent critics. Those who get past that see it for what it is, just a tool, very useful in many ways, not so much in others.
TypeScript has fundamentally better OO utility that Javascript, Dart was developed using OOP, Kotlin absolutely kept those ideas, etc. etc..
Obviously, maybe not the best for a lot of systems programming.
It's 100% here to stay, or at least an evolution of it.
- echelon 6y agoI agree with you, but trying to map your problems onto tree-based OOP inheritance is absurd. Trait-based programming solves polymorphism much more elegantly as any type can adopt a behavior. These systems are going to replace the old paradigm.
- jariel 6y agoMost OO paradigms include pretty strong architectures for traits/interfaces. They are definitely useful, but 'inheritance' is extremely useful in many cases wherein there is a lot of material overlap in code. It gets out of hand fast and it's not perfect, but it's just so useful at a small scale, in so many ways.