How complex can a parameter default expression be?
Dave Herman
dherman at ccs.neu.edu
Sat Dec 22 05:30:32 PST 2007
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
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss
More information about the Es4-discuss
mailing list