What is the difference between classical inheritance and prototypal inheritance? - Deepstash

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 inheritance, object composition.
  • Red Flags: No preference for prototypal inheritance & composition over class inheritance.

131

586 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 is the difference between classical inheritance and prototypal inheritance?

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. 

What is functional programming?

It produces programs by composing mathematical functions and avoids shared state & mutable data.

  • Good to hear: Pure functions/function purity; Avoid side-effects; Simple function composition; Examples of functional languages: Lisp, ML, Haskell, Erlang,...

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