How complex can a parameter default expression be?

Brendan Eich brendan at mozilla.com
Fri Dec 21 12:40:35 PST 2007


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



More information about the Es4-discuss mailing list