YetAnotherPostOnJavaClosures
So, I fell over some articles with both the words closure and java in them this week.
It was this article about JavaFX closures.
Since I’ve done some of my non-mandatory classes in my stud.scient. days (like the last 4years) it kinda woke my interest.
It seems like lots of things has happend in the Java world since I last had any real interest in it (somewhere around 1½ year ago).
- Java 6 and 7.
- Scripting languages on the JVM, like Scala and Groovy. Scala looks quite interesting in my opinion.
- And all the stuff that I’ve been ignoring when coding small things in Java 1.4 SE and having fun with generics in Java 5 SE.
- Like for example J2EE, the bean concepts and Application servers and everything
- Spring
- Hibernate
- JUnit
- Test-driven-development
Maybe “fell over some articles” is a bit inaccurate. I’ve actually been trying to catch up. My main focus has been on the things I needed in my day-to-day work. That included JUnit and Unit-testing, Spring and the Application Server Enterprisy way of doing things.
Luckily I already spent some time reading up on the concept of SOA.
There is a ton of material online about all these things. Currently(as in the past year) there’s alot of talk about feature request for Java 7. Including closures. I tried to do a “quick” catchup on the subject and decided to share my findings with the world:
As far as I gather there currently exist two proposals:
- CICE – Concise Instance Creation Expressions by Josh Bloch, Doug Lea and Bob Lee
- BGGA – Gilad Bracha, Neal Gafter, James Gosling, Peter von der Ahé
and as in any other good war on the internet, it seems like we are at a point where religion is the turning point. The CICE people believes that the BGGA is “overly complex”, and will alienate users by “pushing the complexity of the language beyond the point where Joe Java can’t use the language anymore”
Another interesting twist is the fact the Neal Gafter – who I see as the current “main-man” behind BGGA, is working at Google as well as Josh Bloch and Josh Blach is the JCP representative for Google as pointed out by Ricky Clarkson (and down played by Neal Gafter).
So no real catfight there. But among the readers there’s a very Web2.0-ish involvement in the debate. Lots of evangelists on both sides. (I’m a BGGA’er myself! To me it seems like CICE is like sitting between two chairs). Among these debates and blogentries there’s lots of interesting reading (and hearing; podcasts).
Apart from the other links in this post I recommend:
- Gafter with closure examples
- Gafter with prototype for javac and a rewrite of fork/join code to use closures.
- (Actually all of Gafters blog is very interesting if you like programming language issues)
- JavaPosse podcast. (BGGA people as well)
- IBM on the debate: Java theory and practice: The closures debate
If you need even more reading try some of these googlesearches:
- Comments to Gafter and closures
- Josh Bloch and Closures
- Gilad Bracha andClosure (Actually i really like his blog all in all. Just the name and Im sold “Computational Theology”. Too bad it’s discontinued, but hey, he still writes a bit on Blogspot)