James Long (2013-12-09T15:54:51.000Z)
Hey guys,

First posting to this mailing list. I'm defining a few ES6 features as
sweet.js macros so existing projects can easily leverage them. I also
happen to think macros are a big deal for JS and this is how future
extensions should be defined... (at least ones that are mostly
syntactic) My project is here: https://github.com/jlongster/es6-macros

I'm working on `class`, and it's mostly working. You can see the tests
here: https://github.com/jlongster/es6-macros/blob/master/tests/class.sjs,
and the generated code here:
https://github.com/jlongster/es6-macros/blob/master/tests/class.js

My question is with `super`. I've searched the archives and read the
spec to answer most of my questions, but one thing is unclear. What
exactly is the scope of `super`? Is it valid to use `super` inside a
nested function, like in this example?
https://github.com/jlongster/es6-macros/blob/master/tests/class.sjs#L91

If so, `super` seems somewhat magical in that it can resolve the
prototype of a `this` object that isn't available (when that function
is called, `this` is not the object anymore). Are there clear rules
with how `super` is resolved somewhere?

Thanks,
James
domenic at domenicdenicola.com (2013-12-10T02:29:43.427Z)
First posting to this mailing list. I'm defining a few ES6 features as
sweet.js macros so existing projects can easily leverage them. I also
happen to think macros are a big deal for JS and this is how future
extensions should be defined... (at least ones that are mostly
syntactic) My project is here: https://github.com/jlongster/es6-macros

I'm working on `class`, and it's mostly working. You can see the tests
here: https://github.com/jlongster/es6-macros/blob/master/tests/class.sjs,
and the generated code here:
https://github.com/jlongster/es6-macros/blob/master/tests/class.js

My question is with `super`. I've searched the archives and read the
spec to answer most of my questions, but one thing is unclear. What
exactly is the scope of `super`? Is it valid to use `super` inside a
nested function, like in this example?
https://github.com/jlongster/es6-macros/blob/master/tests/class.sjs#L91

If so, `super` seems somewhat magical in that it can resolve the
prototype of a `this` object that isn't available (when that function
is called, `this` is not the object anymore). Are there clear rules
with how `super` is resolved somewhere?