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

> Pragmatists used inheritance

Because at some point mainstream OO languages made inheritance easy and composition harder, nothing more.

Composition with Java used to be verbose. Inheritance declaration was simply a single keyword.

If Java had "mixins" from the start, people would have used composition way more.



I saw a lot more composition than inheritance in C++ and C#. I think inheritance and polymorphism have their place. Like anything, they can be misused.




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

Search: