David Herman wrote:
> > My question was whether the semantics of break and continue would
> > support the following:
>
> Yes, this is another good case to consider. Thanks for pointing it out; I'll
> add this to the strawman:lambdas proposal. Essentially this is another aspect
> of the semantics of 'function' that is implicit -- that it cancels out the
> scope of break/continue labels -- and it's precisely these implicit elements
> of a language feature that break expected equivalences. (They are essentially
> "unhygienic" -- if you push me, I can explain the connection to macros.)
>
First off, I'm really glad that "clean" functions are being considered
for ES-Harmony - another step toward hygienic macros!
I read through the strawman:lambdas proposal and saw that it did not
mention anything about |var|, e.g.
(function() {
lambda {
var x = 10;
}();
return x;
})()
Does the |var| within the lambda define a var in the function body, and
does that var declaration hoist to the top of the function body?
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss