local

Waldemar Horwat waldemar at google.com
Thu Aug 21 11:10:04 PDT 2008


Brendan Eich wrote:
> On Aug 21, 2008, at 8:21 AM, Peter Michaux wrote:
> 
>> I think that the let statement
>>
>> let (x = 2, y = x) {
>>   print(y);
>> }
>>
>> should desugar to exactly
>>
>> (function(x, y) {
>>   print(y);
>> })(2, x)
> 
> We've been over this. What if you replace print(y) with return y?
> 
> I had slides in 2006 talks on ES4 that showed how folks use closures  
> for everything, including scoped statements and scoped expressions.  
> That does not mean everything should desugar to function applications.
> 
> Besides the return issue, there are break and continue to consider,  
> and the arguments object.

... and 'this' and 'var' and legacy arguments on function objects ...

    Waldemar


More information about the Es-discuss mailing list