Java 8 lambda syntax decided - same as C# and Scala
mail.openjdk.java.net
Java 8 lambda syntax decided - same as C# and Scala
1–10 of 81 posts
Re: Java 8 lambda syntax decided - same as C# and Scala
#2Finally a decision was made. The decisional process is too slow, this is why Java in 2011 still misses those features that languages like C# already support since years.
Re: Java 8 lambda syntax decided - same as C# and Scala
#3Groupthink: I think we should have a vote on if we're going to vote on when we're going to set a deadline for deciding on lambda syntax.
Re: Java 8 lambda syntax decided - same as C# and Scala
#4"Mistakes will be made, but that's good because it means decisions are being made." -- Steve Jobs
Re: Java 8 lambda syntax decided - same as C# and Scala
#5Lambdas are a lot of fun on C#.
new Thread( => { doStuff(); }).Start();
Re: Java 8 lambda syntax decided - same as C# and Scala
#6"Mistakes will be made, but that's good because it means decisions are being made." -- Steve Jobs
How is this a mistake ?
Re: Java 8 lambda syntax decided - same as C# and Scala
#7I see that the proposed lambda expressions can omit type annotations on the parameters. Does that mean that Java 8 will have at least some limited form of type inference?
Re: Java 8 lambda syntax decided - same as C# and Scala
#8"Mistakes will be made, but that's good because it means decisions are being made." -- Steve Jobs
How is this a mistake ?
Erm, its not?. Shawndumas was just pointing out that a decision was finally made. They were grappling over the syntax for over two three years.
Now they will just need to grapple over with what kind of scoping that Java's lambdas will have.
Re: Java 8 lambda syntax decided - same as C# and Scala
#9Lambdas are a lot of fun on C#. new Thread( => { doStuff(); }).Start();
According to the grammar int the OP, you need ()'s, no?
new Thread(() => { doStuff(); }).Start();
Or can they be elided in C# or Scala?Re: Java 8 lambda syntax decided - same as C# and Scala
#10I see that the proposed lambda expressions can omit type annotations on the parameters. Does that mean that Java 8 will have at least some limited form of type inference?
The single abstract method interface type of a lambda will be inferred by its declaration site.