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

Prefer delegation over inheritance was one of the first OOP lessons I learnt. I read it in a C++ blog around 2004, it was explained very well with geometric shapes examples.

The only time I used inheritance was while implementing a job execution framework. It fit the pattern nicely.



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

Search: