Skip to content

Comment on Dartium: Google’s New Dart Programming Language Comes to Chromium parent

Comments

Why is it better to have prototypal inheritance? What real problem does it solve?

[deleted]

[deleted]

Sorry, 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.

I'm sorry about that. I misread an article that described the differences. I'm just going to delete that last comment...It's embarrassing.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.