3 ms·
"Prefer composition over inheritance" is actually a well-known mantra and appears in, for example, the Design Patterns book from 1994, which is basically the OO
by nsajko 3y ago
"Prefer composition over inheritance" is actually a well-known mantra and appears in, for example, the Design Patterns book from 1994, which is basically the OOP bible. And this is within the OOP bubble, you won't even find inheritance outside of it.
https://en.wikipedia.org/wiki/Design_Patterns https://en.wikipedia.org/wiki/Design_Patterns
Don't take undergraduate OOP courses seriously.
- chii 3y ago> a well-known mantra which isn't an explanation, but just the same as the OOP mantra that was taught in undergraduate courses.
- zelphirkalt 3y agoOne reason is the unstable base class phenomenon. A some changes in the base class require you to constantly change all your derived classes.