return when desugaring to closures
Brendan Eich
brendan at mozilla.org
Thu Oct 9 21:59:13 PDT 2008
On Oct 9, 2008, at 6:44 PM, David Herman wrote:
> Sorry, I was unclear.
No, my fault for missing "declaration form".
> I meant 'lambda' for the expression form and 'define' for the
> definition form.
Do keywords cost more than concepts?
If people think define name(x) x and lambda (x) x are different
beasts, then different names win.
If people think of lambdas (what else to call them? not "functions")
as being named or not when used as expressions, and named when
declarations (parallel to the existing function forms are in ES3), but
being different (albeit similar; cleaned-up) function-like beasts,
then one name for the three forms that parallel the ES3 function forms
seems better.
It's hard to argue about from first principles outside of the
specifics of ES3 and modern JS implementations and teaching. The
specific JS books I know talk about functions having several forms, so
it seems better to me to keep lambda parallel. I see the appeal of
define for the declaration (definition, rather) form, though.
/be
More information about the Es-discuss
mailing list