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 18:20:36 -0700
Cc: public-script-coord@w3.org
Message-Id: <E9F89178-1199-4AB1-AEE8-411C634D0B0A@mozilla.org>
To: David Bruant <david.bruant@labri.fr>
On Sep 23, 2011, at 6:12 PM, David Bruant wrote:

>>> What is the rational behind each of these decisions?
>> AIUI, "own" costs a direct property per instance, reified. "prototype" obviously does not.
> What do you mean by "cost"? Is it purely an implementation concern?


> If so, it doesn't seem to be for Opera and Chrome currently.

So what? We're trying to agree on a standard, not pick some winners from the mix of five top browser vendors.

> Regardless of ECMAScript representation (own or inherited properties),
> the same information has to be stored in a way or another.

No. For "own" the object itself must have a "property map" or equivalent. It can be done pretty efficiently, but that takes more custom set-up code. There's no free lunch. A property per instance where there are N>1 instances costs more than a property per prototype.

Received on Saturday, 24 September 2011 01:21:14 UTC

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