This story paints a gloomy outlook for Sun Microsystems. This purchase would certainly end the “wars” between IBM and Sun over Java… One has to wonder what it would mean for the future of Java (the language, the platform, everything). At least HotSpot and the class library are open source now.
My understanding is that Microsoft are cashed up in this economic crisis. Plus they’ve even hired Neal Gafter. Microsoft hire a lot of very good guys. With Gafter over at Microsoft, I wonder if that influenced the decision to squash closures for Java… That was the dumbest move for Java. I suppose it doesn’t really matter: for me, Scala is the next Java.
I wonder if businesses will be more likely to adopt .NET rather than Java now though and really turn the tide. This global recession is turning out to be what I call The Greater Depression, some The Second Great Depression and still some other young ‘uns The Great Depression 2.0. I wonder who will come out on top? With ReSharper, Visual Studio is actually pretty good! So, no excuses – go brush up those C# skills!😉
Just watched Neal Gafter’s Google tech talk about closures again. I really hope that the community gets behind this proposal. Let’s do it right rather than opting for any “pragmatic” solution that amount to a concise syntax for anonymous classes. Gafter’s proposed will allow the “language” to change between updates to the Java Language Specification. This will allow more experimentation and innovation. I encourage you to watch the video for the details. Additional information can be gleaned from the JavaPolis interview.
There has appeared a consensus proposal on the javac.info site. It does appear that Bob Lee (Crazy Bob) has been turned around. I hope the consensus is not a compromise on the original proposal’s intent.
A interesting talk by Neal Gafter. Neal explains some of the problems with using anonymous inner classes and how closures will address those. With closures for Java being sold to developers it seems like they are much closer to being added to the official language specification. Yippie!
References from the talk:
Seems from Neal’s resume that closures are indeed “proposed for inclusion in JDK7”🙂
I was just taking another peek at the Groovy site and notice this beauty:
They should get their facts straight!
If you read the entire article above please note that closures have *indefinite* extent , not *dynamic* extent.
Even the “big names you know” in the Java software development community can make mistakes when it comes to closures.
Gavin King thinks that closures wouldn’t work in Java because of checked exceptions. However, since the use of checked exception is optional you can use “closures” (annonmous inner classes) pretty well if you either don’t use checked exception or alternatively wrap checked exceptions with unchecked exception (like the JDBC template in Spring). I was wondering if it would be possible to have you cake and eat it too on this point with Java 1.5 generics – another poster says it is possible to parameterise on the checked exceptions. I hope that’s true because that’s the best of both worlds – “closures” and checked exceptions – or at least living life without wrapping every last damn checked exception in an unchecked one😉.
James Strachan commented that closures have made it into C# 2.0. Another poster correctly pointed out that this is just *not* the case. I can understand why you’d thnk that – you really have to read between the lines in those Microsoft articles😉. With all the good .NET stuff coming out of Microsoft lately I’m surprised they didn’t correct this properly in C# 2.0. I much prefer their implementation of generics – it’s not based on type erasure like in the Java.
Martin Fowler (if you follow the link through to his article) is right on the money. Closures are good. Lisp is good. Ruby is good. Smalltalk is good. You gotta love Martin.