Constructors need to be able to recognize uninitalized instances(?)

Axel Rauschmayer axel at
Sun Mar 17 17:38:16 PDT 2013

>     if ( this ===null || typeof this !== "object" ||  this[$fooBrand] !== false) /*CAAF*/
> Then the last Or operand is true if either the instance has already been initialized or if `this` is an object that does not have a property whose key is $fooBrand (e.g. a namespace object). Interestingly, this expression is not the same as `! this[$fooBrand]`.

Sorry, correction:
`this[$fooBrand] !== false` is not the same as `this[$fooBrand]`. The former is true for `undefined`, the latter isn’t. The following is more intention-revealing:

    if ( this ===null || typeof this !== "object" ||  this[$fooBrand] === undefined || this[$fooBrand]) /*CAAF*/

Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list