It looks like Java is getting closures. After years of the .NET folklaughing at us as they compare delegates to futzing with anonymous inner classes, and the guys with true closures (ruby, lisp, …) laughing at the poor static folk who don’t have them, the Java platform finally can.
The fact that this is so late in the game, and the need for backwards compatibility rises too:
Unfortunately, compatibility prevents us from changing existing APIs. One possibility is to introduce a boxing utility method somewhere in the libraries…
Having “^ expression;” to mean ‘return out of a closure’ to stop some of the madness of “does return get out of X or Y?” is interesting.
I hope that Dolphin ends up with something great here, and not the mess we have with generics and type erasure.