Non-extensibility of Typed Arrays

Andreas Rossberg rossberg at google.com
Wed Sep 4 07:55:46 PDT 2013


On 4 September 2013 16:44, Filip Pizlo <fpizlo at apple.com> wrote:
>> On Sep 4, 2013, at 3:05 AM, Andreas Rossberg <rossberg at google.com> wrote:
>> As part of binary data, typed arrays are implicitly constructed "on
>> the fly" as views on a backing store. Any notion of identity -- which
>> is the prerequisite for state -- is not particularly meaningful in
>> this setting.
>
> Are you proposing changing how == and === work for typed arrays?  If not then this whole argument is moot.

No, they are just rather useless operations on data views. That
doesn't make the argument moot.

>> Also, it is preferable to make them as lightweight as
>> possible.
>
> See my previous mail. You gain zero space and zero performance from making typed arrays non extensible.

I think you are jumping to conclusions. You can very well optimize the
representation of typed arrays if they don't have user-defined
properties. Whether that's worth it I can't tell without experiments.
Admittedly, it's a minor point.

/Andreas


More information about the es-discuss mailing list