>
> But as I pointed out, we have problems already in JS:
>
>   function f(x) {var x; ...}
>
> the var x restates the formal parameter. It does not shadow it.


Ah - observable here:

    > function crazypants(x) { var x; return x; }
    undefined
    > crazypants(123);
    123

If it shadowed, we would expect undefined.  Even so, information can only
flow from left to right across the curly boundary.  That's expected.  But
if we allow parameter default expressions to have visibility into the
function body, then we have bidirectional flow across curlies.

Kevin
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to