Home Digital garden Composition over Inheritance

Composition over Inheritance

Seedling

Inheritance locks you into a rigid structure and forces your to predict the future. You make large overarching structural decisions at the beginning of the project which cause untold pain and suffering further down the line.

Composition on the other hand allows you to pick and choose what you need when you need it, letting you build the perfect little things for each situation.

It’s more flexible, it’s more powerful, and it’s really easy to do

— Mattias Johansson


References

  1. Composition over Inheritance