W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2012

RE: Question about implements statements

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Wed, 20 Jun 2012 08:16:37 +0000
To: Cameron McCormack <cam@mcc.id.au>, Boris Zbarsky <bzbarsky@MIT.EDU>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <9768D477C67135458BF978A45BCF9B383839DBF1@TK5EX14MBXW602.wingroup.windeploy.ntdev.microsoft.com>
From: Cameron McCormack [mailto:cam@mcc.id.au] 
...
So I am happy with Boris' preference, which is:

   * A.prototype.f != B.prototype.f &&
     A.prototype.f != C.prototype.f &&
     B.prototype.f != C.prototype.f

   * B.prototype.f.call(a) throws

   * B.prototype.f.call(c) throws

   * A.prototype.f.call(b) throws
...

I think I finally get it.  :-)

Right now, IE implements a hybrid... the property descriptors for the functions are deep copies so that the first bullet above is true. However, each of the separate instances can be transposed on any of the other implementing objects such that the last three bullets all succeed instead of throwing.

I like the flexibility we have today that allows the function instances to be used by any appropriate calling object, and I really don't feel strongly about these being separate instances, so I think my preference is actually the following (which would allow IE to shave some memory (a little) out of our existing type system:

   * A.prototype.f == B.prototype.f &&
     A.prototype.f == C.prototype.f &&
     B.prototype.f == C.prototype.f

   * B.prototype.f.call(a) succeeds

   * B.prototype.f.call(c) succeeds

   * A.prototype.f.call(b) succeeds
Received on Wednesday, 20 June 2012 08:17:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC