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.
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.