By fifthposition
via blogs.tedneward.com
Published: Nov 20 2009 / 09:29
Those of you who've seen me speak on Java 7 at various conferences have heard me lament (in a small way) the fact that Sun decided last year (Dec 2008) to forgo the idea of including closures in the Java language. Imagine my surprise, then, to check my Twitter feed and discover that, to everyone's surprise, closures are back in as a consideration for the Java7 release.



Comments
chhum replied ago:
Voting this one down since Ted appears, unusually, not to know what he is talking about
"My rationale for wanting closures in Java, however, is this: by defining a common implementation for closures in Java, all of the above languages can refactor their implementations of anonymous methods/lambda expressions/etc into something that uses Java's closure implementation, and that'll make calling Groovy anonymous methods from Scala much much easier."
JVM level closure support is already part of JDK 7. This doesn't change it one way or the other. And frankly the opinion of anyone who believes "the Java language is more or less dead" can and should be discounted in the context of whether Java the language gets a new feature or not.
Jawher replied ago:
> JVM level closure support is already part of JDK 7
Would you please provide more details concerning this ?
And I do not understand what's your gripe with Ted's point, which I find completely sound and reasonable. Plus it is backed by many known figures in the Java(and other jvm lnguage) land : every JVM language has to code it's own hacks to build closures/lambdas/anonymous functions on top of the JVM, because there simply isn't a standard way of doing this in the JVM. Have you ever tried to see what your beautiful Scala/JRuby/Groovy/
Voters For This Link (14)
Voters Against This Link (3)