javascript icon indicating copy to clipboard operation
javascript copied to clipboard

Why to avoid class: composition vs. inheritance

Open jnv opened this issue 10 years ago • 0 comments

Revisiting the guide a some of this stuff is primarily an opinion without substantial reasoning. Case in point is the recommendation to avoid ES6 class. For me the primary reason is that it invites reliance on inheritance and hinders composition, which is actually described in few of Elliot’s articles (and raison d'être of stampit). I should add it in later revision.

(But to be absolutely honest, my primary objective with such an opinionated guide is to push devs out of their comfort zone and rethink practices before they repeat the same mistakes we are doing in other languages. They can disagree, but they need to think why.)

jnv avatar Jul 28 '15 15:07 jnv