- From: Brendan Eich <brendan@mozilla.org>
- Date: Fri, 23 Sep 2011 18:20:36 -0700
- To: David Bruant <david.bruant@labri.fr>
- Cc: public-script-coord@w3.org
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? Yes. > 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. /be
Received on Saturday, 24 September 2011 01:21:14 UTC