Array lengthening methods applied to maximally long arrays

Allen Wirfs-Brock Allen.Wirfs-Brock at
Wed May 13 12:11:42 PDT 2009

>-----Original Message-----
>From: Brendan Eich [mailto:brendan at]
>Sorry, I meant the issue James raised: the property is bound and then
>RangeError is thrown. Seems like error-checking should happen before
>any effects are committed.

In general, it's probably not possible to pre-check all possible errors when you consider all the array functions, some of which are fairly complex and all the possible exceptions arising from running properties with strange attribute settings and/or getter/setters properties.

I wanted to say that the state of the array is unspecified if any exception is thrown by these functions but the security lobby objected so the spec. still implicitly requires that stores and exceptions occur in the specified algorithmic order. Of course, I don't really expect implementers to pay any more attention to that requirement then they have in the past, particularly if it gets in the way of seriously optimization opportunities.


More information about the es-discuss mailing list