>
>
> Hopefully I’m wrong in that Foo.call(this) is illegal, but if it is, this
> is a devastating change, especially when traits are scheduled for ES7 or
> later.
>
Class constructors will now throw when called.
The changes to classes were fundamental but necessary to support
subclassing of builtins (and future extensions to classes).
For mixins, can you move the initialization logic into a method (or a
static method), instead of having it in the constructor?
class M() {
// methods
static initialize(obj) { }
}
function ctor() {
M.initialize(this);
}
// etc.
Is this a viable pattern for traits/mixins?
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss