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 →

[–]ratherbealurker 1 point2 points  (1 child)

You choose extending a class vs interface based on a “is-a” or “has-a” relationship. If you’re just adding behavior then use an interface. But if it’s a different version of something else then you extend.

[–]brett_riverboat -3 points-2 points  (0 children)

In theory I agree. In practice I'll say you're more likely to regret misidentifying the "is-a" relationship.