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

Okay, so I let this rest quite a bit. I looked at some of the specs using mixins today, and it seems clear that there's a strong appetite for having mixin constructs in WebIDL.

I'd like to account for #195 (dictionary mixins) right away, so I suggest adding support for the following syntax to the spec:

```webidl
interface mixin identifier { /* ... */ };
partial interface mixin identifier { /* ... */ };

// we'd only add those when handling #195
dictionary mixin identifier { /* ... */ }; 
partial dictionary mixin identifier { /* ... */ };
```

The alternative is to do, instead:

```webidl
mixin identifier { /* ... */ };
partial mixin identifier { /* ... */ };

// we'd only add those when handling #195
dictionary mixin identifier { /* ... */ }; 
partial dictionary mixin identifier { /* ... */ };
```

which seems less consistent, but simpler to write.

Any preference or alternative suggestions?

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

Received on Monday, 25 September 2017 23:54:29 UTC