Skip to content

Instantly share code, notes, and snippets.

@Atlas7
Last active October 13, 2016 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Atlas7/d47d01f1b716bd5b304f0717396cd8ea to your computer and use it in GitHub Desktop.
Save Atlas7/d47d01f1b716bd5b304f0717396cd8ea to your computer and use it in GitHub Desktop.
Use composition over inheritance

Composition over Inheritance

"Inheritance encourages you to build this taxonomy of objects very early on in the project. And you are most likely going to make big design mistakes while doing that. Because humans cannot predict the future."

"I think it's just better to use composition from the start. It's more flexible, it's more powerful, and it's really easy to do."

-- Mattias P Johansson, @mpjme

FunFunFunction - Composition over Inheritance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment