Allen's lambda syntax proposal

David-Sarah Hopwood david.hopwood at industrial-designers.co.uk
Tue Dec 2 11:09:54 PST 2008


Peter Michaux wrote:
> 2008/12/2 Jeff Watkins <watkins at apple.com>:
> 
>> Since the goal seems to be allowing control structures like Smalltalk
>> (yay!), how about specifying that one lambda that follows a function
>> invocation is passed as the final argument to the invocation.
> 
> Brendan seemed to reject the idea that "this" could be passed as the
> first argument to a constructor, so that "this" could be explicitly
> named, on the grounds that the parameter lists would not match. I
> agree that parameter lists should match. I was just asking.
> 
> https://mail.mozilla.org/pipermail/es-discuss/2008-November/008203.html
> 
> ----
> 
> If a trailing block outside the parameter list is passed as the last
> argument, then what happens when there is a rest parameter as the last
> argument in the parameter list? It gets a bit messy to determine if
> the last argument passed in was the last argument of some rest
> parameters or an optional trailing lambda.

Will ES-Harmony have labelled arguments? If it does then both of these
problems go away, since the block argument can have a standard label,
and similarly for the this argument.

-- 
David-Sarah Hopwood


More information about the Es-discuss mailing list