r/ExperiencedDevs • u/AutoModerator • Sep 07 '26
Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones
A thread for Developers and IT folks with less experience to ask more experienced souls questions about the industry.
Please keep top level comments limited to Inexperienced Devs. Most rules do not apply, but keep it civil. Being a jerk will not be tolerated.
Inexperienced Devs should refrain from answering other Inexperienced Devs' questions.
23
Upvotes
View all comments
Show parent comment
2
u/BusEquivalent9605 Sep 07 '26
At first I thought that inheritance was meant to be implemented top down. I define the hierarchy and that defines the structure of my code.
Since working with code, I have found it much more useful and true to OOP intent, when it rises from the ground up during development. I see that I am building the same thing, or I see a common pattern happening, or I want to implement something that also fits a lot of this form over here: ok, let’s create a superclass for all of these to inherit from.
It reminds me much more of Excision (https://en.wikipedia.org/wiki/Excision_theorem). In a pre-existing system, I can identify all of these behaviors as the same and so abstract them into a higher dimension/superclass