2 ms·
Why is it better to have prototypal inheritance? What real problem does it solve?
by spankalee 15y ago
Why is it better to have prototypal inheritance? What real problem does it solve?
- deleted 15y ago[deleted]
- spankalee 15y agoSorry, I don't think you understand how OOP works. In classical inheritance, each object only contains its data and a reference to its class. The class owns the methods - they are not copied to every instance. Most uses of prototypal inheritance follow a similar pattern.
- firefoxman1 15y agoI'm sorry about that. I misread an article that described the differences. I'm just going to delete that last comment...It's embarrassing.