Design Patterns · Senior · Question 46 of 75

What's the difference between "implementation inheritance" and "interface inheritance"?

Explanation

A class's extends pulls in the implementation and creates strong coupling to the parent. implements or structural typing define only the contract. Most "composition over inheritance" advice is specifically about implementation inheritance.

Further reading

Problem with a question

Design Patterns · Senior · question 46

Test yourself

Take the Design Patterns · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz