<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/when-did-people-favor-composition-over-inheritance--mcnlqine3" -->

---
title: When did people favor composition over inheritance?
description: Explores the historical origins and context of the "favor composition over inheritance" principle from the Gang of Four's Design Patterns book. Examines the...
canonical: https://daily.dev/posts/when-did-people-favor-composition-over-inheritance--mcnlqine3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: When did people favor composition over inheritance? | daily.dev
og:description: Explores the historical origins and context of the "favor composition over inheritance" principle from the Gang of Four's Design Patterns book. Examines the...
og:url: https://daily.dev/posts/when-did-people-favor-composition-over-inheritance--mcnlqine3
og:image: https://api.daily.dev/og/posts/mCnLQiNe3.png
og:image:alt: When did people favor composition over inheritance?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# When did people favor composition over inheritance?

**[Hacker News](https://daily.dev/sources/hn)** · 5 min read · 41 upvotes · 6 comments

## Summary

Explores the historical origins and context of the "favor composition over inheritance" principle from the Gang of Four's Design Patterns book. Examines the three-page discussion that led to this aphorism, including the white-box versus black-box reuse distinction, language-specific considerations in Smalltalk and Java, and the compile-time versus runtime trade-offs. References Barbara Liskov's earlier work on subtypes and polymorphism, highlighting that composition and inheritance aren't the only options—first-class procedures offer a third alternative that the simplified aphorism overlooks.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.sicpers.info/2025/11/when-did-people-favor-composition-over-inheritance/>

## Community discussion

Top comments from developers on daily.dev.

**@andradei** · 3 upvotes

> 1. It's simpler to understand, read, and write
> 2. It's quite enough for most programs
> 3. It's harder to abuse, unlike OOP inheritance as we have it
> 4. Its easier on the compiler (for maintenance, optimizations, etc)
> 5. People got tired of objects having great-great-grandparents with a bunch of method overrides along the way
> 6. OOP was abuses enough that composition became more attractive to program in
>
> That being said, OOP languages technically support composition, it's just that it's easy to abuse inheritance and method overloading in them.

**@a\_meb\_a** · 0 upvotes

> yes

**@migcarterr** · 0 upvotes

> I've always favored composition over inheritance, significantly simpler mental models in addition to being way more flexible.

## Similar posts on daily.dev

- [Design Patterns Suck](https://daily.dev/posts/design-patterns-suck-kei3cx9df) · iamluminousmen · 1 upvotes · 0 comments
- [Why Your Software Sucks: Inheritance](https://daily.dev/posts/why-your-software-sucks-inheritance-pnnmgu4k8) · Aaronontheweb · 28 upvotes · 3 comments
- [A JavaScript developer's guide to Rails: What does Composition Over Inheritance mean?](https://daily.dev/posts/a-javascript-developer-s-guide-to-rails-what-does-composition-over-inheritance-mean--8ira41rnr) · thoughbot · 2 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#design-patterns](https://daily.dev/tags/design-patterns), [#general-programming](https://daily.dev/tags/general-programming)

[View this post on daily.dev](https://daily.dev/posts/when-did-people-favor-composition-over-inheritance--mcnlqine3)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"When did people favor composition over inheritance?","url":"https://daily.dev/posts/when-did-people-favor-composition-over-inheritance--mcnlqine3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/when-did-people-favor-composition-over-inheritance--mcnlqine3"},"datePublished":"2025-11-16T03:29:29.933Z","dateModified":"2026-03-15T05:23:47.270Z","description":"Explores the historical origins and context of the \"favor composition over inheritance\" principle from the Gang of Four's Design Patterns book. Examines the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a00da7769a1a9c172535d736a018e359?_a=AQAEulh","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a00da7769a1a9c172535d736a018e359?_a=AQAEulh","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":6,"discussionUrl":"https://daily.dev/posts/when-did-people-favor-composition-over-inheritance--mcnlqine3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":41},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":6}],"keywords":"architecture,design-patterns,general-programming","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"When did people favor composition over inheritance?"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/when-did-people-favor-composition-over-inheritance--mcnlqine3","comment":[{"@type":"Comment","text":"It’s simpler to understand, read, and write\nIt’s quite enough for most programs\nIt’s harder to abuse, unlike OOP inheritance as we have it\nIts easier on the compiler (for maintenance, optimizations, etc)\nPeople got tired of objects having great-great-grandparents with a bunch of method overrides along the way\nOOP was abuses enough that composition became more attractive to program in\n\nThat being said, OOP languages technically support composition, it’s just that it’s easy to abuse inheritance and method overloading in them.","datePublished":"2025-12-13T05:45:12.085Z","url":"https://daily.dev/posts/mCnLQiNe3#c-iFyKuAh4z","author":{"@type":"Person","name":"Isaac de Andrade","url":"https://daily.dev/andradei","image":"https://avatars.githubusercontent.com/u/2653546?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"yes","datePublished":"2025-11-29T13:09:45.333Z","url":"https://daily.dev/posts/mCnLQiNe3#c-sK6BrIF3M","author":{"@type":"Person","name":"Phillippe Michel Weir","url":"https://daily.dev/a_meb_a","image":"https://media.daily.dev/image/upload/s--BwH-uTMq--/f_auto/v1740136991/avatars/avatar_N403VFK9lAHNRwlSAhl1h"}},{"@type":"Comment","text":"I’ve always favored composition over inheritance, significantly simpler mental models in addition to being way more flexible.","datePublished":"2026-01-05T14:38:03.305Z","dateModified":"2026-01-05T14:45:03.624Z","url":"https://daily.dev/posts/mCnLQiNe3#c-rPepCA6pr","author":{"@type":"Person","name":"Miguel","url":"https://daily.dev/migcarterr","image":"https://media.daily.dev/image/upload/s---5Jm44Xs--/f_auto/v1744941526/avatars/avatar_4AgplAp3HPnScbBcrSoJ6"}}]}
```

