Look Ma, no "this" (was: ECMAScript Harmony)

Erik Arvidsson erik.arvidsson at gmail.com
Mon Aug 25 22:36:15 PDT 2008


2008/8/25 Brendan Eich <brendan at mozilla.org>:
> On Aug 25, 2008, at 7:07 PM, Erik Arvidsson wrote:
>
>> I've been quiet on these threads for a long time but i just wanted to
emphasize Kris's point. Whatever we decide to desugar the class syntax into
I think it is very important to get this right. We need to make classes work
with existing prototype based inheritance chains. I would consider it a
failure if I cannot create a class that inherits from dijit.TabPane or from
a Prototype UI component for that matter.
>
> Can you define "inherit" more precisely? If it's a matter of giving
classes .prototype objects, perhaps this could be done (it's attractive
since the built-ins, Object, Date, etc., are classes as well as constructor
functions, which have prototype objects).

Inherit as in setting up the [[Prototype]] chain in ES3 speak or as in
extending the vtable from other languages.

>> I would also like to know more about the arguments why people seem to be
set on a zero inheritance class model? Does that imply that one can still
achieve inheritance using prototypes or does it mean that inheritance is not
desired at all?
>
> No, prototypes are here to stay. There's even Object.create to relieve
prototypers from having to write constructor functions.
>
> The desire to explore ZI is two-fold:
>
> 1. It may help the committee to see the smallest possible proposal, and
work up from there to SI and MI.
>
> 2. It may help the language to avoid adding another kind of inheritance
than prototype-based delegation.

Good to hear that. That fits well with what Kris said and what I also
believe in.


-- 
erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20080825/73930020/attachment-0001.html 


More information about the Es-discuss mailing list