using Private name objects for declarative property definition.

Allen Wirfs-Brock allen at
Mon Jul 11 19:45:39 PDT 2011

On Jul 11, 2011, at 7:31 PM, Allen Wirfs-Brock wrote:

>>> Agreed, these are both cases where the category isn't user extensible.  However, I think my statement holds for class-like categorization that are extensible.
>> Do we have any examples of those in the spec., or contemplated for
> See #8: 
>  In JSON.stringify, use a isJSONArray property to control output in array literal syntax and eliminate corresponding [[Class]] check

also see :

The built-in method Array.prototype.concat ( tests each of its arguments for [[Class]] equal to “Array” to determine whether the argument should be concatenated as a single object or whether it should be considered a transparent container of objects that are individually concatenated.   Because it is a class test it is context independent.

This test is problematic in that prevents used defined array-like objects from have this same transparent container behavior.  This applied even to objects that have the Array prototype on their prototype chain.   This transparent container treatment has no fundamental dependency upon the actual unique semantics of built-in arrays. It should be replaced with a check for some user-definable flag property that enables/disables transparent container treatment.

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

More information about the es-discuss mailing list