On Oct 3, 2011, at 8:45 AM, Sean Eagan wrote: > On Mon, Oct 3, 2011 at 10:30 AM, Erik Arvidsson > <[email protected]> wrote: >> But Function.prototype.apply doesn't preserve holes. > > Function.prototype.apply doesn't preserve holes for the the > `arguments` object, but rest parameters aren't yet standardized, and > are intended to replace the `arguments` object, so they could, and in > my view, should preserve holes for both Function.prototype.apply and > foo(...args) activations, at least if array structuring and > destructuring preserve holes as currently specified in the ES.next > draft spec.
In general, a call site doesn't have any knowledge of format of the formal parameter list of the callee and the callee doesn't have any knowledge of how the caller constructed the argument list. So the caller and callee argument semantics can't be interdependent. Also, we probably need to factor in the fact that most current implementations probably don't have a mechanism for passing holes in an argument and that adding such a mechanism might be a deep and expensive change. Would the cost to implementors really be worth the benefit to JS developers? Allen _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

