2009/3/21 Edward Lee <[email protected]>:
> On Sat, Mar 21, 2009 at 11:57 AM, Brendan Eich <[email protected]> wrote:
...
>> Alternatively, we could just eliminate that extra "thisObject" argument,
>>    arr.map(function(x,i,me) { return obj.method(x,i.me) })
> vs arr.map(method.bind(obj) vs arr.map(method, obj)

The last line is no exact alternative to the previous one. In full one
would write:

  arr.map(obj.method.bind(obj)) or arr.map(obj.method, obj)

IMO this double-usage of obj looks strange compared with the closure
version even if the latter is too verbose.

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

Reply via email to