Skip to content

Comment on Why composition is often better than inheritanceparent

Comments

I'm not responding to the article, I'm responding to the parent, who is saying that encapsulation is "much favored" over inheritance. It is not. At least, not amongst more experienced programmers.

Even in marginal cases, you can reasonably decide that a data model should use inheritance. There's no presumptive bias against it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.