Irakli Gozalishvili wrote:
I would also like to express that I think => with proposed (bound this) semantics, are great. And I don't think it introduces any new issues it's just a sugar for:

function() {  /* … */ }.bind(this)

Not quite, since we do not want to call bind -- so it would be unobservable and you couldn't replace Function.prototype.bind with your bind-like and have the VM call your replacement.

Also, arrows do not have exactly the same internal and external properties that the bound function created by ES5 15.3.4.5 gets, in particular [[Construct]]. See the strawman and possibly the latest ES6 draft for details.

HTH, and not to take away from your endorsement of => at all -- thanks! :-)

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

Reply via email to