4 ms·
Inheritance was wrongly added to the OOP paradigm by convention, not theory. Languages that tried to implement OOP used "classical" inheritance (C++, Java, Pasc
by jack9 11y ago
Inheritance was wrongly added to the OOP paradigm by convention, not theory. Languages that tried to implement OOP used "classical" inheritance (C++, Java, Pascal, Python, PHP, etc), so it was handy to say the 2 concepts were related when they were never intended to be.
"Actually I made up the term ‘object-oriented’, and I can tell you I did not have C++ in mind." — Alan Kay
That's the pre-history.
The more recent history is that classical inheritance fought and fought to avoid multiple inheritance. Interfaces were poor substitutes that still only act as API signatures to match, rather than providing orthogonal-inheritance properties like a logging interface. Naturally, over time, composition based multiple inheritance exists in almost every classical inheritance language ... or soon will as codifying common mixin behavior just allows for better compiler optimization (https://en.wikipedia.org/wiki/Trait_(computer_programming) https://en.wikipedia.org/wiki/Trait_(computer_programming).
The interesting question is if Classical inheritance or Prototype inheritance is superior and on what KPMs? Javascript, Lua, Erlang, and more have had a lot of programmer time spent on trying to convert the prototypical systems to classical inheritance idioms. Is this because most programmers are poor and the poor programmers reason better with a flawed system? Is it because they can't comprehend prototypical chains clearly? Is it because of the positioning/dominance of prototypical languages in their respective tech niches that they still exist?
There's lots to be said about the weaknesses of inheritance, but it's far from terrible. Programmers are lazy and so far, it's been the ideal paradigm. These blog posts/youtube videos/rants just seem pathetically misguided. Once someone can provide some real data, an opinion based on the interpretation of that data is something worth reading.
- gpderetta 11y ago>"Actually I made up the term ‘object-oriented’, and I can tell you I did not have C++ in mind." — Alan Kay And that's why C++ traces its origins to Simula, which predates Smalltalk.