On May 22, 2012, at 9:29 AM, Erik Arvidsson wrote:
> I think this proposal has one fatal flaw and that was what brought it
> down the last time we had a proposal which used the same concepts.
> Given:
>
> class C(x) {
> public method() {
> return x;
> }
> }
>
> It seems like the arguments to the constructor are in scope for the
> entire class body when they really aren't. The above would raise an
> error that "x is undefined".
Or worse:
var x = "WAT";
class C(x) {
public method() {
return x
}
}
(new C("inner")).method() // WAT
I'm afraid this is just not a workable approach.
Dave
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss