All Questions
3 questions
44
votes
2
answers
64k
views
Why is inheritance generally viewed as a bad thing by OOP proponents [duplicate]
I keep hearing the phrase "Favour Composition over Inheritance" from GoF, which is being annoyingly mentioned repeatedly by my friend, who thinks it is a valid blanket statement. But is it ...
5
votes
2
answers
1k
views
Design classes to model 3D scanned faces of ancient Greek/Roman sculptures: is multiple inheritance a good design solution?
I would like to deepen the topic of multiple inheritance using Python and I usually find examples that are too simple. I love art and I imagined the following problem and I want to understand if ...
0
votes
1
answer
408
views
Should I force "composition over inheritance" rule to class members?
As I know, according to "composition over inheritance" rule, we should avoid reusing a method by inheritance, but how about class members? Suppose I have parent and child classes like the following:
...