Function.length and Default Parameters

Kevin Smith khs4473 at
Fri Oct 12 06:18:26 PDT 2012

> 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.

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list