Syntax decision

Neal Gafter neal at gafter.com
Fri Sep 30 17:58:14 PDT 2011


On Fri, Sep 30, 2011 at 3:18 PM, Pavel Minaev <int19h at gmail.com> wrote:

> Note that most such special cases also have 1) a single lambda that 2)
> occurs in the final argument position. So I think that this is an argument
> for some kind of syntactic sugar akin to what Ruby has - where you can
> write:
>
>  foo.bar(1, 2, 3) {|x,y,z| ...}
>
> instead of:
>
>  foo.bar(1, 2, 3, {|x,y,z| ...})
>
> i.e. moving the lambda outside the parentheses, and making it look more
> like
> a statement with a body than a function call.
>
> I don't think this is something worth pursuing for the first version,
> though. ()->{} is good enough in practice, and extra syntactic sugar can
> always be slapped on top when and if needed.


Without control transparency
<http://www.youtube.com/watch?v=0zVizaCOhME>(which Ruby has), this
would create a brand new world of confusion.


More information about the lambda-dev mailing list