W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011

[WebIDL] add text to discourage `InterfaceOwnedBySomeoneElse implements InterfaceIJustWrote;` and suggest `ConcreteObjectThatImplementsThatInterface implements InterfaceIJustWrote;` instead.

From: timeless <timeless@gmail.com>
Date: Mon, 29 Aug 2011 13:08:24 -0400
Message-ID: <CAACrNNexPfRn2aPgMZYac=8afVhwja7GDKXbZKbqg-Eq=v8YMg@mail.gmail.com>
To: public-script-coord@w3.org
I recently saw a snippet of Web IDL code that goes like this:

X implements Y;
interface Y: Z
 {...};
Z implements P;

The problem is this:
  ConcreteObject A;
  A implements IFoo;
  A implements IBar;
  A implements IBaz;
  ConcreteObject B;
  B implements IFoo;


If someone decides that they have a `B` and want to make B's IFoo
interface do more, they might say:
IFoo implements IMyFooMore;

expecting it to make B more powerful -- but at the same time, it
causes random effects on A.

Note that we had this experience while working on Mozilla.

The rule which we tried to enforce is this:

Only the owner of IFoo is allowed to extend IFoo until IFoo is frozen,
at which point, IFoo MAY but probably SHOULD NOT be extended by
others.

Roughly that translates into:

  You, owner of ConcreteObject X are free to use 'X implements IWhatever;', but
  You are NOT free to use 'IStandardsBodyThing implements IWhatever;'.

And I'd like to see text to this effect added to the specification.
Received on Monday, 29 August 2011 17:08:59 UTC

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