Allen Wirfs-Brock wrote:
-----Original Message-----
From: Brendan Eich [mailto:[email protected]]
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.
I agree with Allen here. The presence of side effects to the array should be
unspecified if such an exception is thrown. This is what seems to happen in
practice, whether we like it or not.
Waldemar
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss