2 ms·
I think ES6 classes were one of the best things added in ES6. Before then there were a half dozen idiomatic ways to make "classes". Now there's one main way. It
by Waterluvian 8y ago
I think ES6 classes were one of the best things added in ES6. Before then there were a half dozen idiomatic ways to make "classes". Now there's one main way. It's just syntactic sugar. They're not real classes, whatever real means. But they do their job just fine.
- nielsbot 8y agoThey're real enough? Smells like a class, tastes like a class... I think it's unfortunate that classes now have more syntax conveniences than that for building prototypal object hierarchies. I find `Object.create(...)` and `Object.assign(...)` unclear to read and clunky. As another aside: is there any reason to bother with JS constructors and "functional" OOP? I just use `Object.[create|assign](...)`, done.