Historically there have been many languages that don't do inheritance based polymorphism, usually in the more higher level ones. Apple languages are another case.caseih wrote: The presentation was entitled, "Inheritance is the base class of evil."
Basically he makes the case that interface contracts are far more useful and clean than inheritance. This idea fits very well with a language like Python where you have duck typing. I
It is a double edge sword though, it opens up advanced forms of object composition, but carries a price in method dispatch and detecting less errors compiletime.
Opinions about this vary, but it is still all OOP, I don't see the relevance of that argument in a discussion about OOP vs procedural RAD.
But to keep some form of polymorphism, you need to translate "draw()" somehow to a callable address, usually this is done using some hashtable. The compiler generates some hash for "draw" and the table is a map from that hash to an address. And an object might not support a certain method deep in generic code, and errorhandling for that must be generated.t's a bit more awkward in C++ where you have to use some template black magic. And I don't think FB would support this sort of paradigm at present. The core principle is that it shouldn't matter what the inheritance tree is. You should be able to call a method on any object that implements such a method. For example, if you have a collection of objects, you should be able to call "draw()" on each of them, regardless of their actual classes.
More advanced systems try to balance this by having some inheritance (e.g. interface/protocol based) and typing, but still allowing usage over dispatch in an attempt to get the best of both worlds.
Believe me, the other way is also unwieldy when scaled out. Keeping track of what object implements what and handling cases where it does is not easy.Anyway I found it interesting, especially as I'm working on a large Qt project in C++ that uses a lot of class inheritance, and I see how unwieldy inheritance can get.
Anyway, Apple's objc mostly works with such system, so for deep integration with OS X(and not just the unix underpinnings) you need to deal with that.