Hacker News new | ask | show | jobs
by achr2 4359 days ago
Your wikipedia link actually does a good job of showing why the composition shown in the article is poorly conceived. The whole point of 'composition over inheritance' is that your object is still polymorphic on the composed-of classes.
1 comments

that's a good point, in the process of trying to use composition the author has made a (very) leaky abstraction.