The `super` keyword doesn't work as it should?

Allen Wirfs-Brock allen at
Mon Jul 25 02:54:14 UTC 2016

> On Jul 24, 2016, at 7:04 PM, /#!/JoePea <joe at> wrote:
> What if there was also something like `Function.prototype.bind` like `Function.prototype.with`, so `someFunc.with(homeObject)` returns a new function who's [[HomeObject]] is the specified `homeObject`. It would be possible to do `someFunc.with(...).bind(...)` to configure both the home object and `this`.

This was  included in the ES6 drafst for quite awhile. Initially with the name defineMethod and latter as toMethod.  But it was eventually decided to remove it.  The pros and cons of such a function were extensively discussed with in TC39 over a several year period. For example,  see <> 

The issues with defineMethod/toMethod are summarized in <> and <> which is a proposal for an alternative way to address the problem. Notes from that discussion are at <> 

Where it has been left by TC30 is roughly:
1) There are indeed use cases for dynamically configuring the HomeObject binding but they are quite specialized.
2) All of the solution that have been proposed are confusing or error prone.
3) So far, the actual user demand for such a feature is small.
4) We aren’t going to do anything until there is significant real world feedback saying that it really is needed.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list