On Apr 29, 2010, at 7:26 PM, Mark S. Miller wrote:

We can't keep going around on this. I'm all in favor of shorthand for function, but TC39 virtually dropped lambda. Do we really need to revive it (and return to label, and probably other things we probably can't afford)?

What's the metric of "afford" here? If these things impose a
surprising implementation cost, then I'm all ears. Do they?

Maciej's cited objection was not about implementation costs. It was about what users will expect. If lambda is seen as a shorthand for function, then return in lambda will be read as return *from* lambda.

There's also the surprising runtime error you get when you return from a lambda that has escaped and outlived the activation of the nearest enclosing function.

Implementation complexity goes up too, but the user confusion issue is primary.


In any case, lambda aside, I do think we need at least break and
continue to unshadowed labels in lexically enclosing functions.

This has the same dynamic error problem in case of inner function escape.

I've *never* heard any request break or continue to a label in an outer function, btw.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to