As a TypeScript-user, I hadn't really realized this wasn't just plain, regular Ecmascript yet and thus assumed it had to be something else.
So I had to read the blog-post to see what it was, and find out that I no longer know regular Javascript ;)
As a TypeScript-user, I hadn't really realized this wasn't just plain, regular Ecmascript yet and thus assumed it had to be something else.
So I had to read the blog-post to see what it was, and find out that I no longer know regular Javascript ;)
The folks who did ES6 upgrade & TypeScript improvements can't be thanked enough.
I suppose the main difference is that in JS the implementation semantics of classes are defined and can be prodded at. Is that really so different though? I think it's just a bit strong to say ES classes "don't exist" because the methods by which they operate can be observed at a lower level.
Exactly, and `.prototype` is just a runtime and programmable vtable. You copy (by reference) everything from the base prototype and replace (override) every member that you need to. You can even call overridden methods with `BaseType.prototype.foo.call(this, ...)`.
With any luck we'll have so completely abstracted over it by ES12 that it won't even need to be mentioned in the spec.