David Bruant wrote:
Le 10/11/2013 23:34, Brendan Eich a écrit :
Dmitry Soshnikov wrote:
Moreover, for this particular `splice` example, I don't think the
`(start, deleteCount, ...rest)` is the best signature (not to say,
incorrect signature). As again was mentioned, a var-args function
seems should just use the `...rest` params, and exactly starting
from the position when the first optional argument is started. And
if it's started right from the position 0 (as with the `splice`),
then probably the more natural signature would be the `(...args)`.
This gives the wrong function.length result, though (as Allen pointed
out).
I wrote in an earlier message that function length is writable, but I
was confusing with function name... Sorry about that.
Would it make sense to make function length writable?
It is configurable non-writable in ES6, by design. Still a pain to
farble from its useless default in this case (via Object.defineProperty).
/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss