RE: Question about implements statements

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