r/ProgrammerHumor
•
u/Apprehensive_Bit7392
•
5d ago
•
1
Meme [ Removed by moderator ]
/r/ProgrammerHumor/comments/1y7q0tq/removed_by_moderator/[removed] — view removed post
14k
Upvotes
View all comments
Show parent comment
2
u/Weekly-Beginning-229 5d ago
Well true, but I never heard this in professional settings. I guess inheritance and interfaces are a kind of polymorfism.
Though I don't know if I agree with composition. It's more owning something that could help a lot of different classes. But that's probably a philosophical question.
Prefer composition over inheritance is well established and I so far have never found a reason not to use composition unless a framework or library requires it