Umm.. I don't know if needed, but named parameters could be an special
case, that is, the normal parameters has no name, but you can invoke the
function with

f(1,2, x: 3, z: 4);

and use them:

function (arg1, arg2) {
    var x = arguments.x;
    var y = arguments.y;
    ...
}

AFAIR, in V8, arguments is an object, not an array. So, it can be used for
named parameters, a la Ruby.

Angel "Java" Lopez
@ajlopez
gh:ajlopez



On Sun, Sep 15, 2013 at 8:36 PM, Brendan Eich <[email protected]> wrote:

> IOW, actual to formal parameter binding in JS is always positional, with
> undefined triggering defaulting, and (therefore) missing actuals triggering
> defaulting.
>
>
> /be
> ______________________________**_________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to