That seems like an unnecessary restriction, no? Since argument evaluation is already restricted to left-to-right, we could allow default-expressions to refer to earlier arguments without too much trouble, unless I'm missing something obvious.
Dave Brendan Eich wrote: > On Dec 21, 2007, at 4:53 AM, P T Withington wrote: > >> Can it refer to previous parameters? Assign to them? Is this legal? >> >> function foo (a:t = x, b:u = (a = y, z)) > > AFAIK the formal parameters (bound in the variable object of the > activation of foo) are not in scope when default parameters are > computed. > > /be > _______________________________________________ > Es4-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es4-discuss _______________________________________________ Es4-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es4-discuss
