Function.length and Default Parameters

Norbert Lindenberg ecmascript at norbertlindenberg.com
Fri Oct 12 13:12:06 PDT 2012


String.prototype.localeCompare
Number.prototype.toLocaleString
Date.prototype.toLocaleString
Date.prototype.toLocaleDateString
Date.prototype.toLocaleTimeString
Intl.Collator
Intl.Collator.supportedLocalesOf
Intl.NumberFormat
Intl.NumberFormat.supportedLocalesOf
Intl.DateTimeFormat
Intl.DateTimeFormat.supportedLocalesOf
the function returned by Intl.DateTimeFormat.prototype.format

...are all specified in the ECMAScript Internationalization API Specification as taking optional arguments, but not counting them towards the value of their length properties.

Norbert


On Oct 12, 2012, at 11:53 , Brendan Eich wrote:

> Yes, so given the case Kevin raises of default-ful followed by default-less I agree with Kevin: length should reflect all but rest (if present).
> 
> Allen, what built-ins would this break, do you know from checking what built-ins break under the current draft's rule?
> 
> /be



More information about the es-discuss mailing list