Skip to main content

Shake It Up

Posted by editor on February 1, 2007 at 7:04 AM PST


So just what do we mean by closures anyways?

It serves the platform well to have a vigorous debate now about what should go into JDK 7 -- to dig through the pro's and con's of closures, a new properties syntax, a modular JDK, etc. -- and thereby prioritize what should go in. If one of these is a dud with the community, better to know now than after JDK 7 comes out.

Closures came in a very close third in the recent poll What one feature would you most like to see in JDK 7, and was the highest-ranking language change. It's probably gotten the most discussion over the last few months, and has the advantage of already being backed with a concreted, if still-evolving, proposed specification, authored by some of the top luminaries in the Java world.

But... just what are we talking about? Outside of the specification itself, can we speak consistently about what closures are, are not, and how they differ from anonymous inner classes? Neal Gafter has stepped in to provide A Definition of Closures, which traces closures back to their origins in Scheme and Smalltalk, and then makes the case for what they would be in Java:

We are now considering adding closures to Java, a significantly more complex language than either Scheme or Smalltalk. We're not considering them because they seem like a neat idea, or because they worked out well in other languages, or because we're bored. Rather we're considering them: because of the power and flexibility they will add to the programmer's arsenal; because of the improved readability we expect from programs that use closures instead of the existing alternatives; and because of a number of other recently proposed language extensions that will be unnecessary if closures are added. In order to get the full power of closures, they should capture all lexically scoped semantic language constructs.

The last part of Neal's blog makes the case that anonymous inner classes don't cut it, that they can be made to do the same things as closures, but not cleanly or effectively. Take a look and decide for yourself if this helps make the case for putting closures in the next version of Java SE.


Also in Java Today,
the JSR-296 Swing Application Framework prototype implementation is a small set of Java classes that simplify building desktop applications. The prototype provides infrastructure that's common to most desktop applications: application lifecycle, support for managing and loading resources, support for defining, managing, and binding Actions, and persistent session state. "The intended audience for this snapshot is experienced Swing developers with a moderately high tolerance for pain."

Issue 276 of the NetBeans Community Newsletter is out, featuring NetBeans Visual Web Pack 5.5 ML, NetBeans Mobility Pack for CDC 5.5 with Demo, Intel Endorsement of NetBeans, New Hands-On Labs: Java SE 6, Web Services Security, a Cool Tip on Tabs, How to Create a Movie Player, Using the Ajax Map Viewer Component, High-level Introduction to NetBeans IDE & the Community and much more...


In today's Weblogs.
James Gosling announces that
doc.java.sun.com is alive! (again):
"doc.java.sun.com (the javadoc website designed for communal collaborative translation) is finally back up again after a couple of days being dead. It took so long because (tragically) I have a Real Job."

Fabrizio Giudici works through some of the issues with
Setting properties for JUnit testing and NetBeans:
"Keeping an old habit since the old times of C/C++ development and Makefile, mostly under Unix, I usually set environment variables to specify some properties that should be available during compiling or testing. But environment variables can create troubles sometimes."

Finally, Juggy The Java Finch's latest video interview is available:
Mark Reinhold and Heather VanCura - discussing the future of Java at JavaPolis:
"At JavaPolis, a very cool event that is run by the Belgium Java Users Group (BeJUG), I met very very interesting people."


In today's Forums,
mveksler reports on good results with
SwingX DataBinding in version .08:
"I was desperately searching for good open source data binding framework api when I stumbled across SwingLabs. I have downloaded version .08 and created an example that creates java bean binding model from java bean and updates JTextField with data vise versa. It is pretty cool. I got it to work after few hours of playing around because there is no clear documentation on how to use it. Thankfully the api is self-explanatory and I was able to get it to work."

Returning into a hot topic from a few months ago, ivanooi seeks a status update in
Java Kernel. How it is ? When it will be part of JSR ?
"Hi, is there any news about Java Kernel lately ? I cant find any things about it in JSR. Any ideas ? Thanks and hope it will be part of Java 7"

Finally, from the phoneME forum, cgallaty sounds ready to start work on a
Nokia N800 Branch:
"Just picked up a Nokia N800 a bit ago (actually a few days before it was even announced, oddly enough) and noted that there is no JVM on the thing. I seek to fix that. I am a developer with much Java experience, but have mostly done PalmOS and WinCE code for the last few years. I gave up on Palm as they can't seem to figure out what they want to be. (They where pushing J2ME hard a few years back but *still* won't stick it in the ROM, go figure) [...] I've been a Linux guy for years (run Slackware) I recently started a bit of an experiment with getting the Maemo dev tools up in a debian image in the VMPlayer on my laptop (which is XP as I still need to do PPC dev) I'm ready (time permitting) to do the deep dive on the port."


Current and upcoming Java
Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e">events submission form.
All submissions go through an editorial review before being posted to the
site.


Archives and Subscriptions: This blog is delivered weekdays as
the Java
Today RSS feed
. Also, once this page is no longer featured as the
front page of java.net it will be
archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.

So just what do we mean by closures anyways?