The "classes" are merely a short-hand for creating constructor functions with their prototype property already assigned: they add no new semantic complexity to the language, they are mere syntax.
This allows the constructor to inherit its properties from a parent constructor:
class Class {}
Class.hello = "hello";
class SubClass extends Class {}
SubClass.hello // "hello"
This doesn't add any new semantics on top of the already-approved `__proto__` (which already exists in all browsers but IE): Class = function() {};
Class.hello = "hello";
SubClass = function() {};
SubClass.__proto__ = Class;
SubClass.hello // "hello"
EDIT: Oh, and they add `super`: class Speaker {
say(string) { console.log(string); }
}
class Yeller extends Speaker {
say(string) { super(string.toUpperCase()); }
}
new Yeller().say("hi") // "HI"`super` is indeed new semantics though, so that is definitely true.
super.say(string.toUpperCase());
See: http://wiki.ecmascript.org/doku.php?id=strawman:maximally_mi...