Channels ▼

JVM Languages

Moving Quickly To Java 7

For the past two days, I've been attending the JVM Language Summit on Oracle's campus. In its third year now, this small conference (about 100 people) is a gathering of the implementers of JVM languages to discuss projects, problems, and solutions. There is only one track and it's deeply technical. If you like the mechanics of language implementation (as I do), then for three days, this is the only place to be. Authors of several recent Language of the Month articles, namely Charles Nutter (Mirah) and Scott McKinney (Gosu) are both presenting at this summit.

Predictably, one of the hottest topics is the release of JDK 7, the next installment of Java, which has just seen light of day after a five-year incubation. New Java releases tend to be drawn-out exercises in slow adoption. It's an enterprise technology, after all, and at many sites, it runs well enough. Despite Java's excellent record of backward compatibility, an innate inclination to not upgrade platforms until necessary is still the first response of most IT professionals.

For many sites, this means sticking with Java 1.4.2 or Java 5, even though Java 5 came out seven years ago. The problem was that Java 6 provided features that were not needed by many organizations: a callable scripting engine, enhanced annotations, and a compiler API. Moreover, in those days, Java was the principal language for the JVM. The other JVM languages, with the notable exception of Jython, were either non-existent or just emerging.

Today, however, things are different, and there are many good JVM languages available. (In recent months, Dr. Dobb's has covered some of the more recent dialects: Mirah, Gosu, Scala, and Groovy++. We'll move along shortly, but we could have also thrown in Clojure, JRuby, Fortress, NetRexx, and of course, Jython.) One key problem these languages have faced is that until Java 7, the Java runtime was primarily oriented towards the Java language itself. New languages have had to shoehorn the binaries they emit into the Java language type system and runtime constraints — especially languages that are dynamically typed. This led to generally far poorer performance than Java itself. A new instruction in Java 7, called invokedynamic, enables languages to greatly reduce their runtime overhead by not forcing all paths to hew the Java language preconceptions. Presentation after presentation at the Summit show improved benchmarks and reduced code size due to this instruction. So, if you're using non-Java JVM languages, Java 7 has immediate appeal.

For straight Java contexts, the new release has important features, such as NIO 2, a faster file I/O set of APIs, with extra file and directory handling functionality; the new fork/join framework (recently discussed with examples by Eric Bruno); and small language improvements such as the ability to put strings in switch statements. Unlike, invokedynamic, these features require writing new code to exploit them. But the new release's improved performance and parallelism make a good case for the extra effort. To give you a deeper dive into these new features, Eric Bruno's blog will be examining them over the course of the next few weeks.

What About C++?

We're well aware that the new C++0x standard has finally emerged from its own lengthy incubation. Starting today, Andrew Koenig (with help from Barbara Moo) is presenting a series of articles illustrating the new C++ features. In his customary manner, he's picking and choosing the most useful and important features and drilling into those with plenty of advice and practical examples.

And What About Design?

The Jolt judges are wrapping up the final vote in the book category. Winners will be announced soon. Meanwhile, we've begun taking nominations for the Design and Architecture category. Tell your favorite vendors to go to to nominate their products. It's free.

— Andrew Binstock
Editor in Chief
[email protected]
Twitter: platypusguy

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.