Skip to content

There’s Hope! Sane java closures!

The insanity of Gafter and Gosling, as showcased in this ridiculous proposal in an apparent vein attempt to change java into something it clearly isn’t – has finally met serious resistance.

Java hero Josh Bloch (yeah, the Java Puzzlers guy) together with other java afficionados Bob Lee and Doug Lea have proposed a brilliant counter ‘implementation’ of java closures which simply highlights the fact that java already has ‘em – the single-method interface (or abstract class with only 1 abstract method).

I know the proposal is brilliant because, save for the fact that Roel and I kept the ‘new’ in the more concise syntax for anonymous implementations of such a single-method interface, it’s exactly the same. Important: this highlights how natural the CICE (as Bloch/Lee/Lea call it) proposal really is; a group of two resp. three people came up with the same plan to solve the same problem. Exactly the same plan, in fact. How natural is that?

CICE for president^H^H^H^H^H^H^H^Hjava closures!