Syntax poll

Brian Goetz brian.goetz at oracle.com
Sat Jun 11 12:40:42 PDT 2011


That is correct.  Scala's syntax is closer to "Redmond" than to "BGGA". 
  Sorry for the error.

On 6/11/2011 3:31 PM, Pavel Minaev wrote:
> 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