On Monday, July 23, 2012 12:10:57 PM UTC-5, fabrizio.giudici wrote:
And WTF is going to be included in Java 8 at
this point, apart the first class functions?
Java 8 is still a big release. Adding lambdas well will be a big deal, but additionally:
major collections library update. Heavily uses lambdas. Parallelism functionality. Maybe persistently immutable collections (currently you need third party libs to get this)
annotations on types: this opens up a lot of potential
jrockit integration. No PermGen.
Functions in interfaces (similar to traits or mixins in other languages)
New DateTime library.
AFAIK, Java 8 lambdas meet all the criteria of "first class functions". Java 8 purposefully keeps the "final" requirement on outer variable capture, which violates some people's definition of a closure: Dick Wall said that the "final" variable requirement makes the lambdas not true closures. IMO, I think the JDK devs are right that the "final" requirement is a good idea and avoids lots of error scenarios.