Re: [heycam/webidl] Introduce the observable array type (#836)

`pop()` can't change the length first, because that would violate the `Array` invariant that `length` is always numerically greater than any indexed property, as defined [here](https://www.ecma-international.org/ecma-262/10.0/index.html#sec-array-exotic-objects).

(Ok, technically for Arrays it could *just* set `length`, since that has the side effect of deleting equal or greater index properties. But since it's written to be generic, it tries to simulate the invariant even when operating on other objects that may not magically update length.)

I have no suggestions for the broader problem of how to deal with holes.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/836#issuecomment-580980914

Received on Saturday, 1 February 2020 02:21:58 UTC