DEV Community

Discussion on: Why Santa Claus Can't Inherit from Human: A Festive OOP Lesson

Collapse
 
fyodorio profile image
Fyodor

what better way to get into the holiday spirit than with a technical blog post about object-oriented programming

That’s just belissimo dude, ROFL πŸ€£πŸ‘

On a serious note, that’s why composition is always better than inheritance πŸ’ͺ

Merry Christmas πŸŽ„

Collapse
 
noriller profile image
Bruno Noriller

I mostly agree, but there are probably situations where you want/need to use inheritance.

But more than that, I'm thinking here it might fit better to what Sandy Metz said "duplication is far cheaper than the wrong abstraction" than about the composition vs inheritance problem. (or you know... at least it's somewhat related to that)

Happy Holidays!