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

That's a good idea. And as that's a common pattern, you could allow the programmer to specify that the compiler should automatically implement this delegation. You could call this feature something like, I don't know, "multiple inheritance".


Then you don't understand composition. I can pass the actual implementation in the constructor or via dependency injection. With multiple inheritance, your class is restricted to one implementation. Moreover, it couples the class with the internals of observables, rather than using simple interfaces, which composition provides.




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

Search: