Could we make %ArrayPrototype%'s [[DefineOwnProperty]] throw or no-op for numeric keys?
Axel Rauschmayer
axel at rauschma.de
Thu Apr 16 08:06:53 UTC 2015
> As long as we have mutable __proto__ in the language that is not going to help. And even then, you'd have to restrict the whole prototype chain, including Object.prototype.
>
> AFAICT, the only working solution is to change the behaviour of [[Get]] on arrays, such that they do not consider inherited numeric properties -- like typed arrays, or what we propose for strong mode arrays.
Would it help if one introduced new methods `get()` and `set()` for accessing array elements? They could be overridden, but that seems like a simpler, more optimizable check.
--
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150416/6118bd23/attachment.html>
More information about the es-discuss
mailing list