dwyl/Javascript-the-Good-Parts-notes

Is prototypal inheritance good or bad?

sapegin opened this issue · 3 comments

The best parts of Javascript include…

The worst parts include…

Javascript has a class free object makeup, relying instead on objects inheriting properties directly from other objects - this is prototypal inheritance.

Is prototypal inheritance good or bad? And what is object makeup?

@sapegin we typically avoid prototypal inheritance in JS code wherever possible
because it can result in unpredictable behaviour.
We prefer to write purely functional code to eliminate "side effects".

Who are we? ;-)

We are the people who write JS code at @iteles software company @dwyl 😉
where messing with Prototypes is a "code smell". 💩
If a feature can be built/shipped without complex code, why over-complicate it? 🤔