W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2015

[Bug 29004] FrozenArray only provides shallow immutability

From: <nobody@w3.org>
Date: Fri, 31 Jul 2015 19:47:01 +0000
To: public-script-coord@w3.org
Message-ID: <bug-29004-3890-JgPFVzeEmQ@http.www.w3.org/Bugs/Public/>

--- Comment #8 from Travis Leithead [MSFT] <travil@microsoft.com> ---
(In reply to Boris Zbarsky from comment #7)
> So maybe instead of freezing the array, we could mark all the properties
> 0-length and "length" itself readonly noncofigurable, but allow adding other
> random properties...  It's a lot more complicated than just freezing, but is
> the minimal thing with the desired behavior.

The effect that this has seems reasonable to me. It doesn't allow more or less
than we have today. I'd like to explore this further.

> > My argument is that we should be not be swinging toward more restrictive,
> > rather we should be swinging toward less restrictive and more flexible.
> I understand that argument, and maybe we should try to find some middle
> ground between just letting anyone stomp on the array accidentally via
> sort() and locking it down completely.


You are receiving this mail because:
You are on the CC list for the bug.
Received on Friday, 31 July 2015 19:47:05 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:24 UTC