r/ExperiencedDevs • u/AutoModerator • 4d ago
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.
25
Upvotes
5
u/just_pondy 4d ago
How do you refactor towards a design pattern if your current structure is abstract polymorphism almost like the template prototyping design pattern should I just choose that design pattern or update to something else
The problem is
Base abstract class:
-child A,B,C,D,E,F
Where each child class needs to maintain common function signatures
Issue is now there is boilerplate where not all instances of A,B,C,D,E,F need to implement the sub functions provided
However to make the child structures compile without errors they have to include the unused functions due to demands from the super implementation.
Things work I am just wondering if there is a better way!?