arrows and a proposed softCall

Brendan Eich brendan at
Mon Jun 4 09:54:17 PDT 2012

Angus Croll wrote:
> I actually agree. I included non-this methods only because reading 
> through this thread I got a  feeling that there was some consensus 
> that they be treated differently. More than happy to not do that.

You mean you still propose that (=> 42).call({}) should throw, but 
(function () { return 42; }).call({}) should not?

Sorry, this isn't a principled response. There should be no difference 
in result between those two cases.

Apart from principles, it seems to me you think arrows will be such 
sweet sugar that people will make mistakes using this-sensitive API 
contracts, where long-but-this-insensitve-functions would not be so misused.

To demonstrate this we need to see some evidence. It's not enough to 
worry, or to hypothesize unfixed code shipped and failing at scale due 
to failure to test arrow function misuse on the part of developers.


More information about the es-discuss mailing list