Skip to main content

Autoboxing - imagining the spec

Posted by daniel on September 19, 2003 at 6:27 AM PDT

The java.net bloggers are at it again. This time the topic is autoboxing and there's a twist - we only kind of know what we're talking about.

As David Walend writes in his entry Defending Autoboxing (or Save Us From the Preprocessor), "I haven't read the spec yet -- Only JCP members have had the chance. I think we should reserve judgment at least until we can see what the JSR expert group has come up with." This is not a small point. In a JavaOne panel, reasons were given for protecting the expert group from too much input during the JSR approval process but others argued for opening up the process to suggestions during specific periods earlier in the process. This would seem to serve both the expert group and the community expected to use the spec. Perhaps we'll see more of that with JSR 215 .

In the meantime, Walend presents some code that "uses an int[][] for distances. I would like to use autoboxing and generics to easily switch this class from ints to doubles or other Number subclasses. A generic should generate a subclass of the parent class with the correct types, which would be very efficient. I'm hoping that autoboxing will let me keep the efficiency of primitive types while letting me access that flexibility."

The feedback is not so optimistic. Java.net member jimothy first addresses why autoboxing will probably not meet Walend's needs and then goes on to address Walend's comment that using autoboxing properly will require "that developers will use the same care they show with Strings". Jimothy responds "That's precisely my worry, and a perfect analogy for how this has the potential to create performance problems that slip under the radar, because it makes the object creation so hidden. Consider String concatenation; many developers won't realize all the temporary StringBuffer and String objects being created and garbage collected."

In other featured Weblogs, Chris Campbell catches up with his blogging in And This One Is Better Than Ever!. He provides a nice overview of what's going on with the new OpenGL-based Java 2D pipeline and answers imaginary (but real) questions. Chris goes on to comment on the Sun Java Desktop System, Maven, and the Mu project as well as a slew of personal observations. The feedback for his blog entry is, perhaps, technical. It challenges whether Charlie Brown says "Argh" or "Auuugghhh". Finally, Andreas Schaefer weighs in again about outsourcing and stability of jobs in Back to Darwin's Survival of the Fittest.

In Projects and Communities, Kathy Walrath asks you to help Shape the JavaDesktop community. Walrath is looking for articles and other items that will help improve the java.net JavaDesktop community. The Jini Community is featuring the Rio project which is designed to be a dynamic provisioning platform on a network that is changing.

In Also in Java Today, Tom Copeland shows one approach to Managing Complexity: Keeping a Large Java Project on Track. Copeland developed the approach he describes in this ONJava article in the early days of Maven and wonders how Maven now compares with the functionality of his Dashboard project. As you wander around the Java APIs, you may have missed those described in the Full-Screen Exclusive Mode API tutorial. If your platform supports it you may find that you get more performance in graphics intensive applications using this API.

In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review by news director Steve Mallet before being posted to the site. You can also subscribe to the java.net News RSS feed.

Current and upcoming Java Events:

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.

This blog is delivered weekdays as the Java Today RSS feed. Once this page is no longer featured as the front page of href="http://today.java.net"> Java Today it will be archived at href="http://today.java.net/today/archive/index_09192003.html">
http://today.java.net/today/archive/index_09192003.html. You can
access other past issues in the java.net Archive.