Allen's lambda syntax proposal

Peter Michaux petermichaux at
Sat Dec 6 21:19:41 PST 2008

On Sat, Dec 6, 2008 at 7:51 PM, David-Sarah Hopwood
<david.hopwood at> wrote:

> The keyword 'function' shouldn't be used for this because a lambda is
> not a function. However,
>  const name(formals) ...
>  let name(formals) ...
> could be sugar for
>  const name = lambda(formals) ...;

Does "const" have "var" or "let" scoping...or is it even a declaration
at all? Although it is bulky it might be better to write "const var"
and "const let". A variable being constant or not is orthogonal to its
scoping and should be controlled independently.

>  let name = lambda(formals) ...;

I mentioned this a while back. I think it might be a good idea. Scheme has

(define foo (lambda (a b) 1))
(define (foo a b) 1)

which could be translated to ES

var foo = lambda(a, b) 1;
var foo(a, b) 1;


More information about the Es-discuss mailing list