ArrayClass should imply @@isConcatSpreadable
bzbarsky at MIT.EDU
Mon Oct 28 16:46:12 PDT 2013
On 10/28/13 7:43 PM, Boris Zbarsky wrote:
> Our current implementation returns vanilla JS arrays, but returns a
> new one every get, which is pretty suboptimal. So we were considering
> changing them to some ArrayClass interface and thinking about what
> issues that might cause for callers...
To be clear, we _could_ just change this particular API (Gamepad) to
returning a plain-vanilla JS array and the same one every time and allow
the caller to write to it; it's not like the API implementation ever
_reads_ this array, so there aren't even safety issues here. That still
seems like it makes it really easy for a caller to accidentally modify
the array and cause another caller to see incorrect data here, which
smells quite fishy to me.
More information about the es-discuss