return when desugaring to closures

Dave Herman dherman at
Thu Aug 21 15:43:28 PDT 2008

Brendan Eich wrote:
> Arguing by authority is a fallacy. We need specific solutions from  
> other languages that could compatibly fit into JS as extensions. I  
> welcome such specific proposals. The committee has before it the let- 
> as-better-var proposal, which was favorably received by many in Oslo.

Lex Spoon wrote:
>> The approach you are saying won't
>> work, is in fact the chosen and working solution for other languages
>> that have gone this route.  My understanding is that programmers using
>> these languages have been happy with the arrangement.

We all know about the benefits of specification by desugaring. (I do 
know a thing or two about macros, ya know.) But desugaring only works 
when the feature you want really *does* layer properly on top of an 
existing feature. The simple reason we haven't specified `let' as a 
desugaring into `function' is because we want them to behave differently.


More information about the Es-discuss mailing list