- From: Tobie Langel <notifications@github.com>
- Date: Sat, 02 Sep 2017 14:07:18 +0000 (UTC)
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <heycam/webidl/issues/363/326746064@github.com>
> Right. You centralize control over who mixes-in the mixin with the mixin's author, taking it away from the consumers. This is not great; we want to be able to define mixins in one place and have other specs use them. My understanding from previous conversations was that we used implements statements (instead of `interface Foo { include M; };` precisely because the common scenario required control at the mixin author level rather than at the consumer level. In #195 we need to add dictionary mixins. We already need interface mixin partials. We'll probably end up with dictionary mixin partials too. All in all we'll be end up with the following extension mechanisms in the near future: ``` interface mixin M1 { }; partial interface mixin M1 { }; partial interface I { }; Interface I { }; Interface J { }; I includes M1; J includes M1; dictionary mixin DM { }; partial dictionary D { }; dictionary D { }; dictionary E { }; D includes DM; E includes DM; ``` We're we could have: > Right. You centralize control over who mixes-in the mixin with the mixin's author, taking it away from the consumers. This is not great; we want to be able to define mixins in one place and have other specs use them. My understanding from previous conversations was that we used implements statements (instead of `interface Foo { include M; };` precisely because the common scenario required control at the mixin author level rather than at the consumer level. In #195 we need to add dictionary mixins. We already need interface mixin partials. We'll probably end up with dictionary mixin partials too. All in all we'll be end up with the following extension mechanisms in the near future: ``` interface mixin M1 { }; partial interface mixin M1 { }; partial interface I { }; Interface I { }; Interface J { }; I includes M1; J includes M1; dictionary mixin DM { }; partial dictionary D { }; dictionary D { }; dictionary E { }; D includes DM; E includes DM; ``` We're we could have: > Right. You centralize control over who mixes-in the mixin with the mixin's author, taking it away from the consumers. This is not great; we want to be able to define mixins in one place and have other specs use them. My understanding from previous conversations was that we used implements statements (instead of `interface Foo { include M; };` precisely because the common scenario required control at the mixin author level rather than at the consumer level. In #195 we need to add dictionary mixins. We already need interface mixin partials. We'll probably end up with dictionary mixin partials too. All in all we'll be end up with the following extension mechanisms in the near future: ``` interface mixin M1 { }; partial interface mixin M1 { }; partial interface I { }; Interface I { }; Interface J { }; I includes M1; J includes M1; dictionary mixin DM { }; partial dictionary D { }; dictionary D { }; dictionary E { }; D includes DM; E includes DM; ``` We're we could have: > Right. You centralize control over who mixes-in the mixin with the mixin's author, taking it away from the consumers. This is not great; we want to be able to define mixins in one place and have other specs use them. My understanding from previous conversations was that we used implements statements (instead of `interface Foo { include M; };` precisely because the common scenario required control at the mixin author level rather than at the consumer level. In #195 we need to add dictionary mixins. We already need interface mixin partials. We'll probably end up with dictionary mixin partials too. All in all we'll be end up with the following extension mechanisms in the near future: ``` interface mixin M1 { }; partial interface mixin M1 { }; partial interface I { }; Interface I { }; Interface J { }; I includes M1; J includes M1; dictionary mixin DM { }; partial dictionary D { }; dictionary D { }; dictionary E { }; D includes DM; E includes DM; ``` We're we could have: > Right. You centralize control over who mixes-in the mixin with the mixin's author, taking it away from the consumers. This is not great; we want to be able to define mixins in one place and have other specs use them. My understanding from previous conversations was that we used implements statements (instead of `interface Foo { include M; };` precisely because the common scenario required control at the mixin author level rather than at the consumer level. In #195 we need to add dictionary mixins. We already need interface mixin partials. We'll probably end up with dictionary mixin partials too. All in all we'll be end up with the following extension mechanisms in the near future: ``` interface mixin M1 { }; partial interface mixin M1 { }; partial interface I { }; interface I { }; interface J { }; I includes M1; J includes M1; dictionary mixin DM { }; partial dictionary D { }; dictionary D { }; dictionary E { }; D includes DM; E includes DM; ``` We're we could have: ``` partial interface I, J { }; partial interface I, J { }; // again, no need for partial mixins partial interface I { }; interface I { }; interface J { }; partial dictionary D, E { }; dictionary D { }; dictionary E { }; ``` Which seems a much lighter cognitive load. Of course both are tradeoffs. I just want to make sure we're choosing the right tradeoffs. (I'm just exposing those tradeoffs, btw, not pushing towards a specific direction myself.) -- 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-326746064
Received on Saturday, 2 September 2017 14:07:46 UTC