> Anything but optional and rest (as speced) is the simplest rule I can
> think of, except everything including rest, but no one wants that.
>

But the current spec does not say that.  It says stop counting at the first
default, which doesn't really tell anyone anything useful about the
function's signature.

    function f(a = 1, b, c, d, e, f) {}
    f.length === 0; // Huh?

Unless I'm misreading...?

"Simple" may be in the eye of the beholder, but I contend that the above is
surprising.

The problem is that length is not useful for reflection anyway. The
> right way forward is to provide a better reflection API that exposes
> all the relevant information about the parameters.
>

A better reflection API sounds good, but your statement that length is not
useful is demonstrably false.  API judgements aside, we know that it is
currently used with non-WTF results.

Kevin
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to