Allen Wirfs-Brock wrote:
Ultimately, I think we will find that we can't have a semantics like|super|  
that is only usable within a syntactic class definition but has no reflective 
support and no way way to programmatically desugar a class definition into  the 
exact equivalent set of object definitions.

That's not so, and at last week's meeting, we discussed alternatives including gensym'ed lexical bindings used by a less local transformation-spec.

   That's only half a solution.

This ignores the *cost* of letting super be written in any function, which we definitely discussed. Many on TC39 are concerned this is a footgun. Anyone writing super in a function may bind to the wrong object (e.g., the dictionary-parameter object containing the function-valued property, passed into an API but itself not used after the call -- see Kevin Smith's mail from a past thread this year).

We talked about all of this and more than a few people in the room objected to allowing people to write "wrong-super" (like "wrong-this" only even less useful) functions and then tell developers facing bugs to "use Object.defineMethod".

   support of|super|  outside of class is the only think missing to enable that.

No, there are alternatives that confine super to be usable only within classes.

  So, it something I will likely continue top push on.

If the committee or significant (more than two) members are against the approach, this is not productive.

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

Reply via email to