Function.length and Default Parameters

Rick Waldron waldron.rick at gmail.com
Fri Oct 12 06:23:59 PDT 2012



On Friday, October 12, 2012 at 9:18 AM, Kevin Smith wrote:

>  
> > This looks like the sort of thing that will get labeled "uselessly unreliable", then again I was in favor of making length equal the number of formal parameters—rest included.  
>  
> Right - the simpler the rule, the better for this kind of thing.  I wouldn't include rest, though, because it's "cardinality" is really infinity, and therefore not particularly useful in this context.
+1  

Sorry, should've clarified: that was my initial inclination, some time ago. Yes I agree with "everything but the rest".

Rick
>  
> But the simplest rule would require a change to the reported length of some built-ins, as Allen has said.  Tradeoffs...
>  
> Kevin  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121012/bd7f7f4a/attachment.html>


More information about the es-discuss mailing list