Are array 'length' properties really configurable?

Allen Wirfs-Brock Allen.Wirfs-Brock at
Wed Aug 25 12:30:14 PDT 2010

(this should probably have been posted to es5-discuss rather than es-discuss)

Most of the work in step 3 is about maintaining array length invariants  that are outside the scope of the default [[DefineOwnProperty]] specification.  Specifically, the Uint32-ness of the length value and the possible removal of array elements when the length is reduced.  Those would have to be specified regardless of whether the length property was configurable or not.  The only additional attribute analysis that I see is related to the possibility of changing [[Writable]] for length from true to false.  That change is permitted, even if [[Configurable]] is false.  Some of the extra work is there to accommodate the possibility that that when deleting element for a length reduction we encounter a non-deletable array element and that causes the length to snap to that index (+1).  We can't set [[Writable]] to false until we are sure what the final length value will be.

Are there some specific sub-steps of  step 3 that you think are unnecessary?


> -----Original Message-----
> From: es-discuss-bounces at [mailto:es-discuss-
> bounces at] On Behalf Of Jim Blandy
> Sent: Wednesday, August 25, 2010 11:49 AM
> To: es-discuss
> Subject: Are array 'length' properties really configurable?
> Given that makes arrays' length properties non-configurable, it seems
> to me that all the care taken in step three of the custom [[DefineOwnProperty]]
> method in is to no avail, as the default [[DefineOwnProperty]] will
> refuse to make any changes anyway.
> I've filed a Trac ticket for this:
> _______________________________________________
> es-discuss mailing list
> es-discuss at

More information about the es-discuss mailing list