2 ms·
> I'm still unsure what they offer over a simple object with property key values. They offer a particular abstraction, that gives a certain automatic conceptua
by girvo 11y ago
> I'm still unsure what they offer over a simple object with property key values.
They offer a particular abstraction, that gives a certain automatic conceptual clarity for free. Personally, I'm a massive fan of prototype-based object systems, but having the class syntax sugar on top of it has made certain patterns clearer to express even if it's semantically equivalent.
My main issue with ES2015 classes, is that I've seen some projects use it for everything including things that it's really not required for; really putting the _Java_ back in Javascript, so to speak. But that can be said for a lot of language features, really.