RE: [WebIDL] A new way to define UnionTypes

> 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 UTC