3 ms·
This has been great feedback. To summarize, I heard people use inheritance because its the API of a chosen framework and in rare cases when it proves convenient
by jameskerr 6y ago
This has been great feedback. To summarize, I heard people use inheritance because its the API of a chosen framework and in rare cases when it proves convenient like UI Elements.
I also remembered that unit test suites are an instance when I've enjoyed inheritance.
But it sounds like most people here do not use inheritance in the business logic of their apps/systems. Composition and dependency injection do the job of sharing code without sacrificing comprehensibility.
Thanks everyone! This all matches my experience as well. I just wanted to make sure I wasn't missing something life-changing!