Copy vs Delegate
Eric Elliott
51

HUGE DIFFERENCE!!!
Well said Eric Elliott! See I’m a die-hard fan of the Prototypal thing. And I must thank you and many others who has brought the light thus far. You’ve been one of my strong motivators on this topic. In fact, you drove me to this research. I’m not here to fight but to further my learning. So I’ll appreciate your corrections If you see me missing it.

That said, just as you said, there is a HUGE DIFFERENCE. Believe me, I absolutely agree with your points. But the naming bites hard!

Attaching inheritance to this names is only doing us more harm than good in explaining, teaching this concepts — what’s actually going on under the hood.

Concatenative Inheritance. Is this truly inheritance? Does merely concatenating Object A and B into Object C actually means Object C has inherited from A and B? Or am I missing it here? I don’t think so. I believe this is simply mixing up Objects. For example, the `Object.assign()` (yea i know there are other ways to do that) you mentioned ends up overriding the properties of the target Object (Object C). Inheritance does the opposite! Others methods like the `jQuery.extend()` and others, simply are doing mixing. Again, I might not be entirely accurate.

See, we both understands this things. But think about those coming from class-heavy languages. How easy do you think it will be to unlearn everything they’ve been thought on inheritance just to learn “JS INHERITANCE”? No wonder we have many bad JS book authors today, in effect, training bad JS developers who’d still come back to fight you Eric.

I wrote a response to one of your readers yesterday who’s response showed a brutal lack of understanding of the Prototypal thing here on Prototypal Inheritance (objects without classes, and prototype delegation, aka OLOO — Objects Linking to Other Objects) .

It’s kinda like teaching your kid that a black man is a black monkey, but not the ANIMAL monkey. Hey Dad! There’s no connection between man and monkey! A man is a man. A monkey… you already know.

All I’m saying is… Let’s leave Inheritance for those languages then adopt Prototypal(… whatever name that draws the full picture) for JS. It would do us more good when we remove inheritance (and all other classical distractions) from the JS Prototypal naming if we want our community to live in peace, be safe and in harmony in explaining and understanding all this.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.