Re: [heycam/webidl] Designing mixins (#363)

As I mentioned on IRC, I feel like the mental model I'm using for mixins is that they're named interface partials that can extend more than one interface with a more limited set of members.

When a partial interface doesn't have a [Exposed] extended attribute, its exposure set is "the exposure set of the original interface or namespace definition." When it does, the partial interface's exposure set must be a subset of the interface's exposure set.

I feel like this is the behavior that we want for mixins (if my mental model is the right one).

But while this works well with partials, it completely breaks down with mixins as @bzbarsky points out in https://github.com/heycam/webidl/pull/423#issuecomment-326332460, as that implies that a mixin and its members would have multiple exposure sets.

_(As a side note, this might also make the transition from [NoInterfaceObject] to mixins not as straightforward in some cases.)_

So if we want to go with this solution, it sounds like we need to make members' exposure sets function of the interface they're implemented on, and thus no longer constant.

Does that seem reasonable?



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/363#issuecomment-326612204

Received on Friday, 1 September 2017 15:34:50 UTC