{"action":"created","issue":{"url":"https://api.github.com/repos/heycam/webidl/issues/363","repository_url":"https://api.github.com/repos/heycam/webidl","labels_url":"https://api.github.com/repos/heycam/webidl/issues/363/labels{/name}","comments_url":"https://api.github.com/repos/heycam/webidl/issues/363/comments","events_url":"https://api.github.com/repos/heycam/webidl/issues/363/events","html_url":"https://github.com/heycam/webidl/issues/363","id":228877457,"number":363,"title":"Designing mixins","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars0.githubusercontent.com/u/617481?v=4","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-05-15T23:49:50Z","updated_at":"2017-08-31T12:43:54Z","closed_at":null,"author_association":"COLLABORATOR","body":"We've talked a lot about mixins, but I don't think we've written down our plans in one central location...\r\n\r\nThe basic idea is to stop using `[NoInterfaceObject]` interfaces + `implements` to do mixins, and give them dedicated syntax. Along the way we can drastically simplify the model; currently, since interfaces are complicated, mixins are complicated. This leads to situations like the one in [the example in @tobie's latest pull request](https://s3.amazonaws.com/pr-preview/tobie/webidl/tojson.html#create-an-inheritance-stack), where you have mixins that inherit from things that have mixins and so on.\r\n\r\nWe will either eliminate or repurpose `implements`. The only thing you can mix in (either via the `implements` keyword, or via a new one like `mixes` that takes its place) its mixins; you cannot mix in interfaces.\r\n\r\nOnce we have a clear way to talk about mixins, and a simpler model, we should be able to fix the following bugs that largely derive from confusion about how mixins interact with the rest of the system:\r\n\r\n- https://github.com/heycam/webidl/issues/261\r\n- https://github.com/heycam/webidl/issues/164\r\n- https://github.com/heycam/webidl/issues/118\r\n- (...probably more...)\r\n\r\n---\r\n\r\nConcretely, the biggest simplifications we have lined up are:\r\n\r\n- Making it clear that mixins do not create their own interface/interface prototype object, but instead cause the appropriate members to be added to the interface/interface prototype objects of the interface they are mixed in to\r\n- Saying that mixins are not allowed to inherit from anything (this makes no sense as they have no proper JS prototype chain)\r\n- Saying mixins cannot be mixed in to, maybe? I don't think anything does this today, but we should check. It'd make things simpler to not have to recurse and flatten the mixin chain all the time."},"comment":{"url":"https://api.github.com/repos/heycam/webidl/issues/comments/326283913","html_url":"https://github.com/heycam/webidl/issues/363#issuecomment-326283913","issue_url":"https://api.github.com/repos/heycam/webidl/issues/363","id":326283913,"user":{"login":"bzbarsky","id":1457979,"avatar_url":"https://avatars1.githubusercontent.com/u/1457979?v=4","gravatar_id":"","url":"https://api.github.com/users/bzbarsky","html_url":"https://github.com/bzbarsky","followers_url":"https://api.github.com/users/bzbarsky/followers","following_url":"https://api.github.com/users/bzbarsky/following{/other_user}","gists_url":"https://api.github.com/users/bzbarsky/gists{/gist_id}","starred_url":"https://api.github.com/users/bzbarsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzbarsky/subscriptions","organizations_url":"https://api.github.com/users/bzbarsky/orgs","repos_url":"https://api.github.com/users/bzbarsky/repos","events_url":"https://api.github.com/users/bzbarsky/events{/privacy}","received_events_url":"https://api.github.com/users/bzbarsky/received_events","type":"User","site_admin":false},"created_at":"2017-08-31T12:43:54Z","updated_at":"2017-08-31T12:43:54Z","author_association":"COLLABORATOR","body":"That's a good question.  I guess there's not much call for adding the same statics to multiple things at once..."}}
{"actor":{"display_login":"bzbarsky"}}