|
|
|
|
|
by naasking
2856 days ago
|
|
> Implementing an interface is not the same thing as inheritance. Correct, but typical OO languages implement interfaces via inheritance since that's the only means of extension. The problem with inheritance is that it conflates subtyping with subclassing. These are separable concerns, so with interfaces you get proper subtyping without subclassing, but you can't typically have subclassing without subtyping which is why inheritance should generally be avoided. |
|