Skip to main content

Outta Me, Onto You

Posted by editor on March 16, 2009 at 9:49 AM PDT

What Java inherited, and what it bequeaths

It's hard to tell sometimes just how much Thinking in Java author Bruce Eckel still likes Java. On the one hand, he's been heavily involved with Flash and Flex over the last few years, effectively proposing in Hybridizing Java that Java cede the RIA to Flash/Flex and concentrate on the server-side instead. On the other hand, he does organize and host the annual Java Posse Roundup.

So before anyone says Bruce is "biased" or "hates Java", let's hear out what he has to say.

In a new opinion piece for Artima, Bruce looks backward and forward to assess The Positive Legacy of C++ and Java.

In a recent discussion, there were assertions that C++ was a poorly-designed language. I was on the C++ Standards Committee for 8 years, and saw the decisions take place. I think it's helpful to understand the language choices for both C++ and Java in order to see the bigger perspective.

He talks about how C++ was constrained by its requirement for C compatibility, and argues that Java failed to take advantage of its clean break from the past:

[The Java designers] thought operator overloading was too hard for programmers to use properly. Which is basically true in C++, because C++ has both stack allocation and heap allocation and you must overload your operators to handle all situations and not cause memory leaks. Difficult indeed. Java, however, has a single storage allocation mechanism and a garbage collector, which makes operator overloading trivial -- as was shown in C# (but had already been shown in Python, which predated Java). But for many years, the partly line from the Java team was "Operator overloading is too complicated." This and many other decisions where someone clearly didn't do their homework is why I have a reputation for disdaining many of the choices made by Gosling and the Java team.

Still, Bruce goes on to argue that Java's major choices and its subsequent popularity leaves it a proud legacy:

The list goes on to the point where it's just tedious. Does this mean Java was a failure? Absolutely not. Java brought the mainstream of programmers into the world of garbage collection, virtual machines and a consistent error handling model (especially if you subtract checked exceptions, which is possible using techniques I show in Thinking in Java, 4e). With all its flaws, it moved us up a level, to the point where we are now ready for higher-level languages.

Getting back to that unconference he hosts, the next item in the Java Today section is that the first Java Posse podcast released from the Java Posse Roundup '09 is Java Posse #234 - Roundup 09 - Project Coin. In this unconference discussion, Joe Darcy of the OpenJDK group discusses the Project Coin effort to provide small language changes for Java 7, including some of the ideas already proposed, what makes a good language change, the challenges of accounting for all the effects of a language change, proposals from discussion participants, alternatives to changing the language (e.g., use of annotations), and more.

JavaOne 2009 organizers have posted the searchable Content Catalog of this year's technical sessions, BOFs, labs, panels, and hands-on labs. You can search the 346 catalog records by track, type, ID number, speaker, and/or keyword. If the content whets your appetite, early bird registration is still available through April 22. Nominations are also still open for the Duke's Choice Awards, which will be announced at JavaOne.

The latest Java Mobility Podcast is Java Mobility Podcast 74: BlueJ and Greenfoot, in which Ian Utting from the University of Kent and BlueJ and Greenfoot development talk about both products while at SIG/CSE.

In today's Weblogs, Ryan Heaton shows how to Add some sugar to your Web service API. "If you're using JAX-WS or JAX-RS to provide a Web service API, think about generating documentation and client-side classes (Java, C#, ActionScript) at compile-time. It's easier than you might think."

Arun Gupta announces a
GlassFish Workshop at University of Wisconsin, Milwaukee - Mar 20, 2009. "If you are in the neighborhood of University of Wisconsin, Milwaukee then you have an opportunity to get a jump start in GlassFish. Peter Williams and I will be there on Mar 20 and cover the following topics..."

Next, in
JAX-RS 1.1 Draft Available, Marc Hadley reports that "a draft of the JAX-RS 1.1 specification and API is now available. We're now working on implementing the new features in Jersey and adding corresponding tests to the TCK."

This week's Spotlight is on the ROME project, which just announced the release of ROME 1.0. ROME is an set of open source Java tools for parsing, generating and publishing RSS and Atom feeds. "ROME includes a set of parsers and generators for the various flavors of syndication feeds, as well as converters to convert from one format to another." The simultaneously released ROME Fetcher 1.0 is a "caching feed fetcher that supports retrieval of feeds via HTTP conditional GET." An off-site ROME 2 project has been set up to collect proposals for a second-generation ROME API.

Today's Forums start off with set of questions including one about the combination of
Plugin2, pack200, Firefox 3.0.7 & Solaris 10 from qu0ll. "With the above combination it is taking about 4 times as long to download an applet than it does on Windows using the same browser and version of Java and I am guessing this is because the pack200 version of the applet JAR is not the one being downloaded (both the packed version and the full version are available on the server to support all environments) as the full JAR is about 4 times as large as the packed JAR. Is there a reason why the pack200 version of the JAR would not be used in this particular environment?"

In Plugin-API wanted, chaose71 asks, "Can any one recommend a open source plugin API? I am currently developing a program to visualize medical data, that became somewhat big. Some modules are definitely specialized and do not need to be part of the "main" release. It would be great to have some kind of plugin management, e.g. where the user of the main version can download a .jar file, click on "install plugin" and the program gets some new features. This would also make the developement much easier as soon as the program goes open source."

rfm8 asks for
Cookies, but seems to mean persistence: "I have a "login" form that I have built using lwuit library. How can I save user's login information forever, and use it later? I want that each user will login only once using his phone."

Finally, mlvov explains trademark usage in the reply
Re: Can use name of "JavaME" in my commercial product?. "It depends on where and how you want to use it. As part of your product name - no. In description of your product, for example in product documentation or on the web - yes, provided that you follow the Sun trademark guidelines: BTW, "Java ME" is usually spelled with a space between "Java" and "ME"."

Current and upcoming Java

Registered users can submit event listings for the href=""> Events Page using our href="">events submission form.
All submissions go through an editorial review before being posted to the

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 it will be
archived along with other past issues in the href=""> Archive.

What Java inherited, and what it bequeaths


From my perspective, Mr. Eckel's arguments regarding Java language design decisions are largely academic. That's not to say that Java is perfect (no language is), and that some of his suggestions are not valid. I'm just saying for example, that operator overloading would have little effect on my day-to-day work, other than making code somewhat less readable, especially for novice programmers. There are three things that make Java popular in enterprise environments: 1) productivity, 2) WORA, and 3) code that is easy to read and comprehend. Java is still picking up steam as legacy applications are replaced, so I honestly do not see Java disappearing anytime soon. Furthermore, I see the advent of compatible programming/scripting languages as beneficial to the Java EE platform, since good developers will pick the right tool for the right job, and we can use Java and said languages hand-in-hand.