Friday, May 11, 2007

Java Closures : Lipstick on the pig a distinct possibility

Google Fellow Neal Gafter talked lots of sense on the subject of Closures during his JavaOne session. Closures are immensely practical for terse Java - another lesson that Ruby is teaching Java. Imagine never having to write an anonymous inner class just to listen for an event in a Swing application! The design he presented is very well thought out, with practical examples showing how code can be dramatically improved by this simple concept.

The proposed JSR, which to me seems to be a no-brainer for inclusion in a future Java SE release, is well thought out and documented. Sun, obviously, will dilute and devalue the product via the well known pattern "death by committee". Half-wits will xxx and yyy until zzz and we be left with qqq.

The simple fact is that anything of value which is invented outside of Sun (in fact, these days, everything if value is invented outside of Sun) is usually placed in someone's inbox while the Sun developers scramble to produce something that they deem to be better. The Sun product is then released with some explanation of how the original proposal "would not fit into Java's backwards compatibility requirements" or "is too difficult to implement" - despite the fact that the inventors have already implemented and tested it. Basically instead of a shining example of innovation and ingenuity, we're more than likely to get a pig - albeit wearing lipstick to improve the appearance.

1 comment:

Ricky Clarkson said...

There are plenty of people inside Sun who were involved in formulating this proposal. I hope you're wrong in your conclusion.