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

Re: Question about implements statements

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 18 Jun 2012 23:18:41 -0400
Message-ID: <4FDFEF91.5040209@mit.edu>
To: Travis Leithead <travis.leithead@microsoft.com>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
On 6/18/12 6:56 PM, Travis Leithead wrote:
> It seems to me, that an implementer must keep track of which API sets get mixed-in to what objects, and configure the "this" validator of each API to only accept instances that match those target objects. Everything else must throw.
> As a spec author, if I mix in some set of functionality onto my new interface, I expect that those APIs that I mixed in will work with instances of my new object.

Hmm.  I'm not quite sure that you're answering my question.

Again, my question is this, and I will try to reduce confusion by using 
methods instead of attributes.  Given this IDL:

   interface Mixin {
     void doSomething();

   interface X {};
   X implements Mixin;

   interface Y {};
   Y implements Mixin;

and this script:

   x = new X();
   y = new Y();

should the call throw or should it do the same thing as y.doSomething()?

For that matter, should x.doSomething == y.doSomething test true or 
false?  Even _that_ is not obvious from the spec, now that I read it 
again.  I had initially read it as testing false, but now I'm not quite 
sure.  What exactly does it mean to have "a copy of each property"? 
What gets copied?

Received on Tuesday, 19 June 2012 03:19:11 UTC

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