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

Eek! Multiple inheritance is not implemented in most programming languages for good reason. In general it is wise to favor composition over inheritance.


It is deciding between "IS A" and "HAS A".

In general, there is no such a rule that says: "HAS A" is wiser. It depends on the use case.


Related, an interesting article: IS-A IS-A HAS-A

http://weblog.raganwald.com/2008/03/is-is-has.html




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: