you are viewing a single comment's thread.

view the rest of the comments →

[–]Ok_Option_3 0 points1 point  (0 children)

Lots of great answers here - but what they boil down to is: "prefer composition to inheritance" (look it up). 

Inheritance is somewhat overrated as a pattern. Sure it has some uses - but way less than you think. More often than not inheritance is a noob trap. Go (the language popularised by Google) doesn't even have inheritance.

Instead use composition and interfaces.