W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

[Bug 19571] .length should count optional arguments

From: <bugzilla@jessica.w3.org>
Date: Wed, 17 Oct 2012 14:49:03 +0000
To: public-script-coord@w3.org
Message-ID: <bug-19571-3890-RIuHF4eatQ@http.www.w3.org/Bugs/Public/>

Erik Arvidsson <arv@chromium.org> changed:

           What    |Removed                     |Added
                 CC|                            |arv@chromium.org

--- Comment #1 from Erik Arvidsson <arv@chromium.org> ---
There has been lot of discussion regarding this and at the moment we are
sticking to what is in the ES6 draft.

Function .length is not very useful either way you go. To be able to do feature
detection related to the arity of a function a better reflection mechanism is
needed. For example, DOMTokenList.prototype.add changed from "DOMString token"
to "DOMString... tokens". Would you want length to be 0, 1 or Infinity in that
case? With ES6 length becomes 0 because that is the number of required
parameters, the least number of parameters needed for the function to "work".

You are receiving this mail because:
You are on the CC list for the bug.
Received on Wednesday, 17 October 2012 14:49:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:07 UTC