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).
P.S.: I do also agree that it's better to reserve the syntax of `(foo: bar)` for the optional types (that are used in TypeScript now).
Indeed! /be _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss