Non-extensibility of Typed Arrays

Filip Pizlo fpizlo at apple.com
Wed Aug 28 23:01:21 PDT 2013


Here's the part that gets me, though: what is the value of disallowing named properties on typed arrays?  Who does this help?

I don't quite buy that this helps users; most of the objects in your program are going to allow custom properties to be added at any point.  That's kind of the whole point of programming in a dynamic language.  So having one type where it's disallowed doesn't help to clarify thinking.

I also don't buy that it makes anything more efficient.  We only incur overhead from named properties if you actually add named properties to a typed array, and in that case we incur roughly the overhead you'd expect (those named properties are a touch slower than named properties on normal objects, and you obviously need to allocate some extra space to store those named properties).

-Filip



On Aug 28, 2013, at 10:52 PM, Steve Fink <sphink at gmail.com> wrote:

> On 08/27/2013 09:35 AM, Oliver Hunt wrote:
>> My complaint is that this appears to be removing functionality that has been present in the majority of shipping TA implementations, assuming from LH's comment that Chakra supports expandos.
> 
> Note that even in the engines that support expandos, they will probably
> not survive a structured clone. I just tried in Chrome and they get
> stripped off. This further limits their utility in today's Web.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130828/49cb1851/attachment-0001.html>


More information about the es-discuss mailing list