> > > 1. During phase /* 1 */, the this-binding is uninitialised; trying to > access > it through an explicit `this` keyword will throw a ReferenceError. >
This seems overly restrictive to me. The common case (as in ES5) will be classes that derive from Object, where no such restriction is necessary. The crux of the problem is that some host-defined classes that cannot safely separate object allocation from initialization. What if the @@create hook was allowed to return undefined? In such a case, your "uninitialized" semantics would apply: attempting to dereference "this" before calling super(...) would throw an error, and super(...) would essentially set the "this" value? In all other cases, the currently drafted semantics would apply.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss