return when desugaring to closures

Brendan Eich brendan at mozilla.org
Thu Aug 21 17:48:09 PDT 2008


On Aug 21, 2008, at 5:39 PM, Peter Michaux wrote:

> Dave Herman wrote:
>
>> 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.
>
> Who is "we"?

That is clear from context: "we haven't specified ...".


> Brendan seemed to invite discussion about the semantics of let.

I was trying to get comments from users of JS1.7's let forms. The  
keyword argument was not interesting to me. But this is es-discuss,  
we can talk about whatever we want to do with ECMAScript futures.


> If the committee has reached consensus then those outside the  
> committee
> could save time and keystrokes and focus on other things where  
> there is
> need.

Rather than change the topic to complain about something that hasn't  
happened (no ES4 spec yet), why not respond to the substantive point:  
let != function-expression-call?


> How do outsiders know which proposals have reached committee  
> consensus?

I said that many on the committee were in favor, notionally and in  
some details, of much of JS1.7's "convenience features", and some  
beyond:

let as new var
destructuring assignment and binding forms
generators (modulo keyword issue)
expression closures
spread operator
rest parameters
optional parameters

So not everything is a blank slate in TC39 for ES-Harmony, nor should  
it be.

/be



More information about the Es-discuss mailing list