Array.prototype.concat result length (ES5.1)

Allen Wirfs-Brock allen at wirfs-brock.com
Mon Jul 18 11:06:44 PDT 2011


On Jul 18, 2011, at 10:51 AM, Jeff Walden wrote:

> 
> Easiest fix is to just add the length-set to concat.  For a quick ES5 erratum that seems best to me.

Yes, this needs to be in the errata.

> 
> Removing all the RangeError stuff, and making array indexes just non-negative integers,  would be nice for ES6 or similar.  I suspect changing that won't break anyone worth caring about, although I do know some people have taken the time to care about this in the past (mostly in a spec-nut way :-) ):
> 
> http://hexmen.com/blog/2006/12/push-and-pop/
> 
> Without having thought too hard about exactly what would be involved, I suspect the amount of stuff you'd need to adjust, and the complexity of checking for sane behavior in all cases (including some of the 2**52 upper-bounding edge cases, depending on what new semantics you might want for "array indexes" or whatever), would make it unwise to try for ES5 errata.  But I could well be wrong about this, so I wouldn't necessarily write off that possibility.

We won't do this as an errata.  It is a change that would have to be treated as a change in a future edition rather than an error correction of the current edition.


Allen


More information about the es-discuss mailing list