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

Re: All ECMAScript attributes should be non-configurable

From: Brendan Eich <brendan@mozilla.org>
Date: Fri, 23 Sep 2011 19:33:52 -0700
Cc: public-script-coord@w3.org
Message-Id: <F0144485-31C5-4ED0-80A0-167A67BA3AF0@mozilla.org>
To: David Bruant <david.bruant@labri.fr>
On Sep 23, 2011, at 6:42 PM, David Bruant wrote:

> It's not really a concern of winning. 2 independent implementations made
> this choice (own over inherited). This may indicate that they have been
> able to efficiently implement DOM objects this way.

We went over this much earlier in the WebIDL spec process. I don't see why we'd revisit now.

> If the standard's motivation is implementation concerns, then we
> currently have 2 proofs that the concern is not that big, so I'm not
> sure the decision should be driven by this concern.

The problem is we want some of these properties to be accessors, and accessors not on the prototype do hurt perf. You can measure this.

Various cheats not expressible in the JS can optimize to fake "own" hidden accessors that look like data properties, but those lie via ES5's reflection APIs.

Ruling those out, we're left with prototype accessor properties.

Received on Saturday, 24 September 2011 02:34:20 UTC

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