On Sat, Oct 11, 2008 at 7:12 AM, David-Sarah Hopwood
<[EMAIL PROTECTED]> wrote:
> Yuh-Ruey Chen wrote:

>> 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?
>
> To satisfy Tennent's correspondence, all var statements must hoist in the
> same way ignoring lambdas -- i.e. to the top of the innermost enclosing
> function body (if not in the global scope).

How to define a variable that is local to the enclosing lambda? Isn't
the ability to do that essential?

Peter
_______________________________________________
Es-discuss mailing list
Es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to