Hacker News new | past | comments | ask | show | jobs | submit login

> Is there any advantage to using OO in a language that doesn't have classes or inheritance?

Like Self or javascript?




JavaScript and Self don't have classes, but they do have inheritance.


Self has delegation. Conflating delegation and inheritance is no better than conflating embedding and inheritance.


Delegation seems pretty similar to inheritance to me. What am I missing?


It doesn't set up is-a relationships and can be used for significantly more than differential inheritance (IIRC Self uses it for scoping).




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

Search: