Transcript from the "Clearing Up Inheritance" Lesson
>> Kyle Simpson: I've talked badly enough I think at this point about inheritance, and class-oriented design and why I don't think it's good. I wanna to move towards something that's better, I wanna clear up some misconceptions about it. So, in a traditional classical inheritance system, we have apparent class. And we copy down to the instances and we copy to the child and copy to instances.
[00:00:46] The linkage goes from right to left and bottom to top. This is not a slight nuanced difference, this is a completely, my God, entirely different system. And its a really powerful system that we are not fully taking advantage of. There's a different designed pattern here that we have been completely missing out on, there's another design pattern.
[00:01:11] So what I really wanna do is were gonna finish out by talking to you about the different designed pattern that simplifies what we do, and gives us more power. And that design pattern is called Behavior Delegation. So, that will be our last topic of discussion, Behavior Delegation. What I mean by delegation is back to this example, when I say a1.speak, a1 doesn't have a speak method.
[00:01:38] But we delegate from a1 to another object so that that method call can happen. It just happens to be a weirdly name Foo prototype here, but delegation is an object-oriented concept. Is not a class concept is an object concept.