2 ms·
Classes are fine if you understand they're just syntactic sugar for the already extremely widespread constructor+prototype pattern. The primary reason a signif
by pluma 11y ago
Classes are fine if you understand they're just syntactic sugar for the already extremely widespread constructor+prototype pattern.
The primary reason a significant part of the community hates the ES6 classes is that the class keyword is misleading for people who don't understand prototypal inheritance.
The OOP vs FP divide is orthogonal to that as the FP devs in question generally disagree with the constructor+prototype pattern to begin with (and often shun prototypal inheritance entirely).
There's also the people who want JS to be more like Haskell/Lisp, but they've mostly moved to LiveScript and ClojureScript and only occasionally complain from the sidelines.
- codygman 11y ago> There's also the people who want JS to be more like Haskell/Lisp, but they've mostly moved to LiveScript and ClojureScript You forgot about Purescript: http://purescript.org/ http://purescript.org/