Syntax poll
Pavel Minaev
int19h at gmail.com
Sat Jun 11 12:31:50 PDT 2011
Since the cat is out of the bag already, I feel the need to correct the
below (I did so privately to Brian, but it seems that the new poll has
quoted the old descriptions verbatim with no changes).
BGGA syntax is used by Groovy. It's not used by Scala - the latter uses
Redmond syntax pretty much exactly as in C#, except that "type name" becomes
"name: type" in parameter declarations with non-inferred types
(corresponding to general Scala syntax). Here are some Scala lambdas:
(x: Int, y: Int) => x + y
(x, y) => x + y // inferred types
x => x + 1 // can omit parens for unary lambda with unary types
() => { println("hello"); println("word"); }
On Sat, Jun 11, 2011 at 12:06 PM, Llewellyn Falco <isidore at setgame.com>wrote:
> BGGA is scala-groovy
> Redmond is C#
> I'm not sure about strawman
>
>
More information about the lambda-dev
mailing list