On Aug 5, 2014, at 10:11 PM, Brett Andrews <[email protected]> wrote:

> My preference would be for `super()` to remain as-is, and give `super` the 
> equivalent semantics: reference a method of the same name in the parent class 
> (as opposed to invoke). I only provided the alternative since my ultimate 
> view is that `super` and `super()` should function similarly (either both be 
> legal, or both be illegal).

I addressed this in my first replay

On Aug 5, 2014, at 6:37 PM, Allen Wirfs-Brock <[email protected]> wrote:
> 

> in some languages, such a unqualified 'super' reference would be equivalent 
> to 'this'.

> We intentionally made it an error for that reason.  I perhaps could be 
> convinced that it should mean the same as 'super.submit’.

But it isn’t something we necessarily need to consider for ES6.  We can always 
relate the error if we find that people really want to do that.  I suspect we 
won’t.

expressions like:
super = expr;

are probably good examples of DDWIDM. (Don’t Do What I Didn’t Mean)d

in a method named ‘foo’
super = expr;
would be equivalent to 
this.foo = expr;
if ‘foo' was not already defined as an access property (and methods usually are 
data properties).
Quite likely something the programmer didn’t mean.

Allen

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to