Channels ▼

JVM Languages

The JVM As Language Farm Club

In the recent redesign of the front page of Dr. Dobb's, you might have noticed a small, but important, change. Namely, the navigation tab that formerly was entitled "Java" was renamed to "JVM Languages." This change reflects our belief that while Java remains the central language of the platform, the prodigious rate at which new languages are coming to market on the JVM warrants our wider attention and coverage. And indeed, in the last twelve months, we've covered a representative assortment of them: Fantom, Gosu, JRuby, Mirah, Groovy++, and Scala. We could easily have added NetRexx, Jython, and Clojure.

These languages fall into three broad categories: 1) ports of other languages (JRuby, Mirah, Jython); 2) Improvements on Java (Fantom, Groovy, Scala, Gosu); and 3) languages that are doing their own thing, it just happens to be on the JVM (Clojure and NetRexx). For your reference, we put together a quick slideshow of these JVM languages discussing their pros and cons and illustrating them with a small code snippet.

What is curious about the fecundity of the JVM as a language platform is that in the original positioning of .NET vs. Java, .NET, not Java, was the multi-language platform. To put it into the exact terms, .NET renounced multi-OS support (it ran only on Windows) but countered with excellent language interoperability, making it trivially easy for components written in different language to work together. To this end, Microsoft supported JScript, J#, Visual Basic, and C#. These four languages plus those of other vendors dragged into porting to .NET (such as Eiffel and others) were the proof of concept. Microsoft later dropped support for J#, minimized its attention on JScript, and watched most of the VB folks migrate to C#. And so, rather than the expected language explosion on .NET, a language consolidation was going on. Microsoft even threw in its research language, F#, but this step did not fire up the imagination of language developers.

Java was originally positioned as a platform that ran everywhere, but had only the one language. It turns out that the 'run everywhere' mantra was really compelling. (We see the phenomenon repeating itself today in the Web app world, where JavaScript's universality trumps all other considerations.) Java's ability to serve on massive server farms as well as inside Android phones gave it remarkable appeal. Moreover, Sun documented the JVM well; and it was comparatively easy to find tools that facilitated bytecode generation and manipulation. In contrast, Microsoft's .NET was not as friendly. Nor was Redmond's support for people and companies who could extend its franchise. It would undoubtedly be competitive in the new languages space today if Microsoft had done more to embrace the work undertaken by Miguel de Icaza's team with the Mono project. Microsoft, it is rumored, helped them under the table, but it never really cottoned to the Mono project and certainly never embraced them. That's too bad. Microsoft's excellent work with C# remains bottled up inside a closed universe.

Today, we witness the release of Kotlin, another language for the JVM. Kotlin, which is presented in depth in our Language of the Month feature, is designed by JetBrains, which is unarguably the company with the finest reputation for programming tools. Its IntelliJ IDEA, ReSharper, and RubyMine IDEs are all top of the line products. Many of them, especially the first two, elicit feelings of deep affection and admiration from their users. As a long time IntelliJ IDEA user myself, I share those feelings of admiration and occasionally delight. This is a company that knows how to deliver products that developers want. So, I have high expectations of Kotlin

A new language, however is a risky prospect. Why tie up engineering talent coming up with one, when there are already so many to choose from? The JetBrains team was forthcoming in its response: No language currently available met their needs. Most of JetBrains' code is written in Java (with a tiny smattering in Groovy) and the productivity they were seeing from continuing in Java across products with so many classes (more than 50,000 classes for IntelliJ alone) forced them to consider writing their own language.

I don't know their specific objections to existing solutions, but based on JetBrains' published specs, I can put them together. Groovy runs too slowly and Scala compiles too slowly. Neither had great tool support, especially in IDEs. Neither language had quite the complete set of features JetBrains needed, so the company took features from both and integrated them into Kotlin along with lightning-fast compilation cycle and native Java execution speed. It's clear from these comments that Kotlin falls into the second group of JVM languages mentioned above — a better Java language.

The fast compilation and runtime plus the superior tooling JetBrains will deliver move Kotlin to the top of my list of JVM languages. Like many other developers, I'll be evaluating Kotlin carefully and watching how JetBrains moves it forward. Ultimately, if I don't like their choices, I have the luxury of a wealth of alternatives to choose from.

— Andrew Binstock
Editor in Chief
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.