Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: