What does “favor object composition over class inheritance” mean? - Deepstash

What does “favor object composition over class inheritance” mean?

Good to hear:  

  • Avoid class hierarchies. 
  • Avoid brittle base class problem. 
  • Avoid tight coupling. 
  • Avoid rigid taxonomy. 
  • Avoid the gorilla banana problem. 
  • Make code more flexible. 

124

308 reads

CURATED FROM

IDEAS CURATED BY

dustinspe

Secretary at a company

The idea is part of this collection:

How To Become A Digital Nomad

Learn more about career with this collection

How to build a network while working remotely

How to work remotely

How to manage finances while working remotely

Related collections

Similar ideas to What does “favor object composition over class inheritance” mean?

What is the difference between classical inheritance and prototypal inheritance?

In JavaScript, prototypal inheritance is simpler & more flexible than class inheritance.

  • Good to hear: Classes: create tight coupling or hierarchies/taxonomies; Prototypes: mentions of concatenative inheritance, prototype delegation, functional inherit...

What does it mean to not give a f*ck?

What does it mean to not give a f*ck?

Many of our modern values (success, positivity, greatness etc) can actually make us more insecure & miserable. The way to be happy and fulfilled, Manson says, is to not give a f*ck about everything we’re told to care about. 

Instead, get clear on what truly matters, focus y...

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates