Interfaces without implementation are like a day without sunshine
brendan at mozilla.com
Tue Oct 24 08:47:23 PDT 2006
On Oct 24, 2006, at 11:35 AM, P T Withington wrote:
> Using the definitions you cite, interfaces << traits << mixins.
> Traits remove state (and in some cases overriding) from mixins,
> interfaces remove behavior from traits. Or, looking at it another
> way, traits and interfaces take power away from the programmer in
> the belief that the programmer will only hurt themselves. Where
> does es4 want to stand?
If you put it that way... :-P.
We are past the point where a proposal to allow var or method body
declarations in interfaces could "squeak by". I regret not pushing
this earlier; it was discussed, but no one including me put together
a proposal. We questioned the wisdom of making interfaces look like
very different animals from their namesakes in nearby languages. But
that was not the reason we didn't do mixins. Really, we had and
still have a lot to do, under a short schedule.
Extending interface as discussed is possible; the obvious extension
is reserved syntax for which we could provide meaning in the future.
Implementations might take chances providing mixins as an extension
under this syntax. Comments?
More information about the Es4-discuss