You could also check the output of Traceur and TypeScript. I don't know how
close either of them are to implementing the exact semantics of ES6
classes, but I'm sure it'll be helpful in any case.


On Mon, Dec 9, 2013 at 6:28 PM, James Long <longs...@gmail.com> wrote:

> I read Allen's email wrong, thought it implied `this` was lexically
> scoped (which I know is not true. very little sleep at an airport...).
>
> I'll keep digging through the spec, but if someone has a quick example
> what ES5 code I could compile to for roughly the same semantics, that
> would be helpful. From what I understand, you're saying that `super`
> is lexically scoped to the `class` that is defined so I can statically
> compile it out to something like `Foo.prototype.method` if `Foo` is
> the parent class. Anyway, no need to trail on about this, I should
> just RTFS.
>
> - James
>
> On Mon, Dec 9, 2013 at 11:23 AM, Brendan Eich <bren...@mozilla.com> wrote:
> > OnMon, Dec 9, 2013  at 10:22 AM,  Allen Wirfs-Brock
> >
> > <al...@wirfs-brock.com>  wrote:
> >
> >> >  super is lexically scoped
> >
> >
> > This is true.
> >
> >
> >
> > James Long wrote:
> >>
> >> So essentially super is an alias for `Object.getPrototypeOf(this)` ?
> >
> >
> > But |this| is not lexically scoped, so your question's answer must be
> "no".
> >
> > /be
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to