Function.length and Default Parameters

Kevin Smith khs4473 at gmail.com
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...

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


More information about the es-discuss mailing list