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

The original creator of the C++ STL has said in interviews that after a long career of C++ development, he still never uses -- and sees no use for -- any model of inheritance for anything. I've since learned that my own C++ code is much better when I very sparingly, or never, subclass anything. This has the added benefit of also never using vtables.


Indeed - some of the worst systems I've worked on had very long subclass/inheritance chains. It ends up causing a lot of unnecessary coupling.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: