On May 31, 2012, at 5:31 PM, Brendan Eich wrote:

> Mark S. Miller wrote:
>> On Thu, May 31, 2012 at 4:55 PM, Rick Waldron <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> 
>>    Wouldn't this mean that fat arrow functions inherit call, apply
>>    and bind as well? (I may have misunderstood this aspect)
>> 
>> 
>> I believe they do.
> 
> Yes, and both apply and call are useful on arrows, even though |this| cannot 
> be overridden. Arguments still matter ;-).

but they aren't essential and have exact syntactic equivalents

assume f is a fat arrow function

then

f.call(ignored,a,b,c)

is the same as

f(a,b,c)

and

f.apply(ignored,args)

is the same as

f(...args)

I think we want fat arrow functions to support call and apply because people 
will use them out of habit.  But I think we (actually the people who write 
books, etc.) should encourage use of the syntactic forms whenever passing a 
this value is irrelevant.

Allen








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

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

Reply via email to