return when desugaring to closures

Peter Michaux petermichaux at gmail.com
Thu Aug 21 18:50:34 PDT 2008


On Thu, Aug 21, 2008 at 5:48 PM, Brendan Eich <brendan at mozilla.org> wrote:
> 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 ...".

Is there a list of individuals those who will ratify the final
proposal? It isn't apparent reading emails on this list who is on the
committee and who is not.

[snip]

>> 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

I don't mean it as a complaint. It is simply a matter of efficiency.

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

What I was trying to determine is if the "we want them to behave
differently" means there is already consensus that let should not
desugar to a function-expression call. If that consensus exists then
there really is nothing to be gained by outsiders chipping in comments
and doing so is just lost time and energy.

I think a let expression could work either as a function-expression
call or not. It makes sense to me that let desugars to a
function-expression call because those are known semantics. I really
don't think the arguments, this, break, continue, return issues are
that big a deal but I can see someone else might think differently. If
let expressions don't desugar to a function-expression call we will
all survive.

Peter


More information about the Es-discuss mailing list