Should the "length" property of bound functions be configurable

Mark S. Miller erights at google.com
Fri Aug 30 09:54:41 PDT 2013


I think a function's "name" and "length" should have similar attributes. It
seems we have legacy saying that "name" should be writable. This may be
unfortunate, but consistency between the two is the more important
principle.


On Fri, Aug 30, 2013 at 9:34 AM, Brendan Eich <brendan at mozilla.com> wrote:

> Allen probably could use a bug on file at bugs.ecmascript.org -- anyone?
>
> /be
>
>  Claude Pache <mailto:claude.pache at gmail.com**>
>> August 30, 2013 5:35 AM
>>
>> The `uncurryThis` metafunction, given as example in [1], needs to correct
>> the length of a function produced by `bind`. Simplified version:
>>
>> ```
>> uncurryThis = f => Function.protytpe.call.bind(f) //
>> uncurryThis(f).length == 1 instead of f.length + 1
>> ```
>>
>> So, yes, `bind` should produce functions with mutable length.
>>
>> —Claude
>>
>> [1] http://www.mail-archive.com/**es-discuss@mozilla.org/**msg21786.html<http://www.mail-archive.com/es-discuss@mozilla.org/msg21786.html>
>>
>>
>> ______________________________**_________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>>
>>  ______________________________**_________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>



-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130830/fec964c3/attachment.html>


More information about the es-discuss mailing list