Reuse 'do' keyword instead of hash sign (#)

Andrew Haley aph at redhat.com
Mon Jun 20 09:56:22 PDT 2011


On 06/20/2011 04:52 PM, David Goodenough wrote:
> Maybe if you want a keyword, use "lambda".
> 
> So your i.e's below:-
> 
> lambda()(5)
> lambda(){return 5;}
> lambda(int x,int y) { if (x>y) return x; else return y; }
> button.onClick(lambda(Event e) { println("button clicked"); });
> 
> This is not to say that we should use a keyword, rather a suggestion 
> if a keyword is to be used what it might be.
> 
> This is offered in the "calling a spade a spade" tradition.

So, why not "λ"  ?  :-)
Java allows non-Latin characters in sources, surely...

Andrew.


More information about the lambda-dev mailing list