- From: Cameron McCormack <cam@mcc.id.au>
- Date: Wed, 24 Nov 2010 11:56:48 +1300
- To: Brendan Eich <brendan@mozilla.org>
- Cc: Andrew Oakley <andrew@ado.is-a-geek.net>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Andrew Oakley: > > Is this a reasonable way of dealing with the problem? Are there any > > issues with doing this? Is it any better than the proposal from the > > TC39 meeting? Brendan Eich: > C3 is reasonable in my opinion, but it's strictly more complicated > than single inheritance with mixins implemented by "copying" (or > as if they are macros). If JS developers do not need reified mixin > interfaces with .prototype properties, then simpler wins. That was our > judgment last week at the TC39 meeting. Right. Ages ago the spec defined even more complicated handling of multiple inheritance (but without C3 linearisation) than it did recently with the introduction of the mixin prototype object. Even with the proposal to use C3 linearisation rather than whatever perhaps ill-defined one was in the spec back then, I got mostly negative feedback because (1) it required custom [[Get]] etc., (2) it was complicated, and (3) it would likely result in poorer performance. On the positive side, it got you the ability to monkeypatch abstract/ mixin interfaces. I think these are the tradeoffs, and what I heard was that the simpler single inheritance mechanism as proposed, especially in combination with making EventTarget a real ancestor of Node, XMLHttpRequest, etc., was much more acceptable to implementors – especially since it is closer to what they all (kinda differently) do at the moment. -- Cameron McCormack ≝ http://mcc.id.au/
Received on Tuesday, 23 November 2010 22:57:28 UTC