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

Of course all reuse is somewhat similar, but dividing things into separate categories (class, instance, metaclass) and enforcing rules on how they relate isn't a 'just', that's what class based inheritance is.

The issue of abstraction is that, you don't implement prototypal inheritance with copying. No language does. That's why delegation is such a core part of any prototypal inheritance. There are different points and ways that happen. But all inheritance is delegation, in practice.

Can you give an example of when a piece of code (i.e. not data) would be different if it were delegated vs copied?



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

Search: