A few arrow function specification issues

Angus Croll anguscroll at gmail.com
Sat Apr 21 14:10:16 PDT 2012


On Sat, Apr 21, 2012 at 1:56 PM, Axel Rauschmayer <axel at rauschma.de> wrote:

> Counter-question: Isn’t it clear when you create a function whether it is
> going to be a non-method function or a method?
>

It's clear to the implementer - Its not clear to a function that gets it as
an argument - unless fn.prototype is checked


> What is the use case for a non-method function with dynamic this?
>

a) Invoke callback in my context
b) Functional mixins
c) Namespacing by call/apply




>
> Sometimes you might want to pass a method as a callback, but then you need
> to convert it to a non-method function, anyway (e.g. via bind()).
>
>         --
> Dr. Axel Rauschmayer
> axel at rauschma.de
>
> home: rauschma.de
> twitter: twitter.com/rauschma
> blog: 2ality.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120421/0f9a0a97/attachment.html>


More information about the es-discuss mailing list