On Mon, Sep 26, 2011 at 4:47 PM, Xavier MONTILLET <[email protected]> wrote: > Normally, you use an object for optional arguments.
This is probably the most common case in practice, however... > And there is no good reason not to since you don't care about the order of > the arguments. There are two good reasons: * it's more concise since you don't have to prefix each argument access with the the object argument name + ".", however, destructuring now helps here * library author does not need to introduce argument names, the callback author can use whatever names they want, such as an abbreviations for example Also, there are existing and future in-language APIs which receive multiple argument callbacks, for example: * Array.prototype methods * Proxy traps Thanks, Sean Eagan _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

