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

You don't like code reuse?



Love it, and love using plain ol' functions for it


Inheritance is not necessary for code reuse.

All you really need for that is named procedures. A way to combine modules and different files certainly helps too.

Type hierarchies can even hinder code reuse, because you can’t just pick the stuff you actually need.


That question seems blatantly disingenuous.


Composition > inheritance.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: