repeated parameter names and default values

Douglas Crockford douglas at
Thu Sep 27 11:30:51 PDT 2012

On 2012-09-27 9:19 AM, Allen Wirfs-Brock wrote:
> Consider
>     function f(a, b= a=3, c=a) {
>        return a+" "+b+" "+c
>     }
>     console.log(f(1));
> Based upon the conclusions about argument binding at the recent TC39 meeting this will display:
>    "3 1 3"
> Any disagreement of this?

A constantly recurring question in this effort is "Do we want it to be 
consistent, or do we want it to be better?"

I am always in favor of better. So parameter names should not be repeatable.

More information about the es-discuss mailing list