Function.length and Default Parameters

Nebojša Ćirić cira at google.com
Mon Oct 15 09:16:18 PDT 2012


For me (v8) it's more painful. As my code is an v8 extension, I don't have
access to the v8 internals, so I can't:

"specify whether they should be constructors and whether they should have
prototype objects"

Also, getting the length of the function to match 0, 1... is using lots of
argumens[0], [1]... I was told this was less efficient than direct access
to the parameters - it also uglifies the code.


2012/10/12 Brendan Eich <brendan at mozilla.org>

> Norbert Lindenberg wrote:
>
>> More important: These functions were specified this way because TC 39
>> decided that this is the direction for ES6, and even though ES5 style would
>> have been more convenient for us.
>>
> I can't tell if you mean that Kevin's proposal would be adverse, helpful,
> or neutral.
>
> TC39 does change its mind before the spec is finalized; please don't mind
> that.
>
>
> /be
> ______________________________**_________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>



-- 
Nebojša Ćirić
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121015/0972d1aa/attachment.html>


More information about the es-discuss mailing list