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

RE: [WebIDL] A new way to define UnionTypes

From: Andrei Bucur <abucur@adobe.com>
Date: Wed, 29 Aug 2012 17:40:21 +0100
To: Adam Barth <w3c@adambarth.com>, Boris Zbarsky <bzbarsky@mit.edu>
CC: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <6E8E2AB3820BBC418FE7F934E849C9D01895E2DA40@eurmbx01.eur.adobe.com>
> It's not impossible in IDL.  In fact, it's remarkably easy to define in IDL.  We
> just don't want to implement multi-inheritance in WebKit because it's slow.
> However, I don't see how Andrei's proposal makes the implementation any
> more efficient.
>

The proposal tries to reduce the issue this by providing a mechanism to distinguish between the two: the "inherited" type and the "implements" type. Using the first one in an IDL changes nothing (or almost nothing) in the binding, it stays fast and clean. If the declaration cares about what the return type implements, not what inherits, only then the binding gets convoluted and slower to satisfy that need.

> Note: Gecko already pays this implementation cost because XPCOM support
> queryInterface.  We'd rather not add queryInterface to WebKit.
> 
> Adam

If it's actually OK to return a supplemental interface, then I suppose this proposal is useless and the differentiation between the two cases is implementation specific.

Thanks for your answers,
Andrei.
Received on Wednesday, 29 August 2012 16:41:01 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:54 GMT