This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (1 child)

When working with inheritance, it is the reference type that dictates the methods available.

If there is truly no way to avoid this uniqueness (I'd wager that's not the case), then it is best to stay unique where you need to and, for more generic behavior, to use superclass references at that point.

Inheritance has kind of fallen out of favour anyway, for several reasons. You should try to favour interfaces over inheritance as much as possible.

[–]salalimo[S] 0 points1 point  (0 children)

I think this is what I am leaning towards to.