W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: Web IDL syntax

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 10 Jul 2009 13:23:44 +1000
To: Shiki Okasaka <shiki@google.com>
Cc: public-webapps@w3.org
Message-ID: <20090710032344.GB14701@arc.mcc.id.au>
Shiki Okasaka:
> 'InterfaceInheritance' is currently defined as a ScopedNameList or
> epsilon. But in practice I don't see any web interface that actually
> uses the multiple interface inheritance like,
>    interface X : A, B, C
>    {
>    }

SVG does:


Admittedly this isn’t Web IDL, still OMG IDL.

> Is it possible to inhibit the multiple interface inheritance at the
> Web IDL grammar level? Now that we have ImplementedOn or 'implements',
> the multiple interface inheritance seems to be unnecessary to me.

There is a subtle difference between ‘implements’ and multiple
inheritance.  In Java, ‘interface X : A, B, C’ will result in a Java
interface that looks like

  public interface X extends A, B, C {

while having

  interface X { };
  X implements A;
  X implements B;
  X implements C;

will just correspond to

  public interface X {

and all X objects will happen to implement A, B and C.

In ECMAScript there is no difference.

Also note that I’ve dropped [ImplementedOn] in favour of the
‘implements’ statement, although I notice just now that there are still
a couple of references to it that I need to remove.

Cameron McCormack ≝ http://mcc.id.au/
Received on Friday, 10 July 2009 03:24:36 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:17 UTC