4 ms·
The community is pretty divided and es6 classes are fairly controversial. Don't be too surprised to see a lot of people avoid them. On purpose. And it's not bec
by phoenixmatrix 11y ago
The community is pretty divided and es6 classes are fairly controversial. Don't be too surprised to see a lot of people avoid them. On purpose. And it's not because they aren't familiar with OOP.
- spion 11y agoThat may be the case with the node community, however AFAICT the React community seems much more open to fully utilizing ES6
- phoenixmatrix 11y agoIts the javascript community as a whole that is divided, generally between imperative/OOP and functional devs. Has nothing to do with Node or otherwise. Even if you like classical inheritance, the Class keyword is poorly implemented for it, from both a normal OOP language's point of view OR from a prototypal inheritance point of view. It's bad at both.
- natrius 11y agoWhat exactly is bad about ES6's `class` from a classical inheritance point of view?
- pluma 11y agoClasses 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/
- deleted 11y ago[deleted]