Yes, perhaps, but some of the syntactic sugar has teeth.
Declaring a class creates a function object that is the constructor for the class, using the code provided for
constructor within the class body, and for named classes, with the same name as the class.
ES6 does not provide a means to declare class instance default property values (i.e. values which are not methods) within the class body to be stored on the prototype and inherited. To initialize instance value you can either set them as local, non inherited properties within the constructor, or manually add them to the class constructor's
Static methods declared within the class body are added as properties of the class constructor function. Avoid using static class method names that compete with standard function properties and methods inherited from
Function.prototype such as
Less sugary is that class declarations and methods are always executed in strict mode, and a feature that gets little attention: the
.prototype property of class constructor functions is read only: you can't set it to some other object you've created for some special purpose.
Some interesting stuff happens when you extend a class:
prototype object property of the extended class constructor is automatically prototyped on the
prototype object of the class being extended. This is not particularly new and the effect can be duplicated using
the extended class constructor function (object) is automatically prototyped on the constructor function of the class being extended, not
Function. While it may be possible to replicate the effect on an ordinary constructor function using
Object.setPrototypeOf or even
There are other differences such as class objects not being hoisted in the manner of named functions declared using the
I believe it could be naive to think that Class declarations and expressions will remain unaltered in all future versions of ECMA Script and it will be interesting to see if and when developments occur. Arguably it has become a fad to associate "syntactical sugar" with classes introduced in ES6 (ECMA-262 standard version 6) but personally I try to avoid repeating it.