- From: Boris Zbarsky <notifications@github.com>
- Date: Mon, 28 Sep 2015 06:47:38 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Message-ID: <heycam/webidl/issues/59/143748136@github.com>
The point here is that if two types are distinguishable, then given any object you have to be able to tell which of the two types it is. This means that if there is an object which can claim to be of both types, they need to not be distinguishable. Therefore interpretation A is the correct one and we should adjust phrasing as needed to make that clear. > To determine if A and B are distinguishable, you have to look at all interfaces in the web platform Yes, you do. That's necessary to achieve the "given any object" goal. I agree that this is rather annoying, but I don't see how the goal can be achieved otherwise. > And, is this actually implementable, or implemented by existing binding layers? What Gecko's binding layer implements is the following: Each interface has a set of interfaces associated with it. This set contains the interface itself, all interfaces inheriting from it (transitively, not directly), and all interfaces that have it as a "consequential interface" or inherit from an interface that has it as a consequential interface. So in your example above, the set associated with `Baz` just contains `Baz` itself. The set associated with `Foo` contains `Foo` and `Baz`. The set associated with `Bar` contains `Bar` and `Baz`. Two interfaces are distinguishable if their associated sets are disjoint (have no common members). I believe this is a correct implementation of your interpretation A. --- Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/issues/59#issuecomment-143748136
Received on Monday, 28 September 2015 13:48:06 UTC