The First Class Languages of the JVM

The announcement of Kotlin, a JVM based language from JetBrains, drew quite a bit of attention. Firstly, when the makers of the best Java IDE in the world announce their own language you pay attention and secondly, it wasn’t that long ago that to the average developer the JVM meant Java and only Java and the rise of other languages on the JVM was some sort of bizzaro dream. While Jython (1997) and JRuby (2001) predate Groovy (2003-ish) it was the latter that really seemed to show everyone that something other than Java could be run on the JVM. The fact that Groovy is a super-set of the Java language meant that the barrier to adoption was very low and developers seemed to lap it up. This encouraged adoption but the push from the likes of SpringSource and the rise of Grails piggy-backing on Ruby on Rails’ success seemed to drive its acceptance. Even the fairly poor tooling support seemed to not be too much of a barrier as many companies started using it and benefiting from something other than Java.

Kotlin’s emergence does raise an interesting question;¬† from the developers perspective, what are the first class languages for the JVM right now and who will be in that list in 3-5 years time, and more importantly why?

Of all the languages that can run on the JVM, I would say that the the list of the premier league languages can be restricted to the following: Java (natch), JRuby, Jython, Clojure, Groovy and Scala (Kotlin is interesting but until Jetbrains write IntelliJ in it I won’t take it too seriously). Of these 6 languages it also interesting to note that only 2, Java and Scala, are statically typed and 3 are versions of a previous language: JRuby (Ruby somewhat obviously!), Jython (Python) and Clojure (Lisp dialect).

Scala has been seen as the language most likely to supplant Java but its complexity (especially the multiple different ways you can write and do the same thing) has held it back. It’s functional nature has also meant that many Java/OOP developers freeze in the headlights when Scala code switches to this mode. Scala is awesomely powerful and the likes of Twitter, Foursquare and GridGain use it in missions critical systems but it currently lacks that magic sauce that makes it accessible to mere mortal developers.

The same goes for Clojure. Lisp and its dialects has never really found a massive following in the commercial environment despite being held in high regard elsewhere. Even with the increasing interest in functional languages it still does not have the momentum required to be wildly successful but it is still early days for Clojure.

Ruby (1995) and Python (1991) are not new languages. Since there appear to be about 3.5 times as many jobs currently being advertised for Java than for Ruby and Python combined¬† it appears unlikely that even JVM friendly versions of them will be the next big thing. Don’t get me wrong, Jython and JRuby are great languages but they are hardly new kids on the block.

Groovy‘s similarity to Java makes it’s adoption very easy but its performance historically has not not great. I’m being polite since it’s actually sucked pretty hard.. Whether this is still an issue with the inclusion of JSR 292 in JDK 7(Supporting Dynamically Typed Languages on the Java Platform) remains to be seen but the dynamic typing does not tend to be as accepted as static typing in the enterprise context. I know this is a contentious point but Nuxeo moved from Python to Java and Twitter’s adoption of Scala indicate that context is important: if you have a large-scale performance orientated application, static typing is your friend and this is where Java is used heavily. Should you really like Groovy’s syntax and want static typing, Groovy++ offers what you need but again, does it offer enough to replace Java. I’d have to say no.

So what will be the language that retires Java? I have no idea and I don’t think that anybody else does either but I suspect that the language that finally does has not been written yet. It appears that the usage of Scala, Groovy, Clojure, Jython and JRuby will increase in the next few years but none of them seem to be the Java killer. The increasing adoption of languages with better type systems than Java seems assured for the the next few years but none of them seem to offer the combination of features to supplant Java.

If I had to back one of the runners, Scala appears to be the one with the most momentum as well as arguably the most power and functionality. The perception of complexity can be dealt with by education and training so it may well grow to be a contender to Java but given the learning curve, it is hard to see it ever replacing it. Who knows, it may be a language from an IDE company that finally sees Java developers cry “The King is dead, long live the King.”

6 thoughts on “The First Class Languages of the JVM

  1. David Ventimiglia

    May I submit for your consideration, Gosu. Like Java and Scala, but unlike the others you mention, it is statically-typed. Like Java does now and Kotlin may have sometime in the distant future, Gosu has good tool support now, in the form of Eclipse and IntelliJ plugins. Like Groovy and maybe Java, but unlike say Scala and Clojure, it is easy to learn and easy to use. Like Java but unlike the others (more or less), it is currently being used by dozens of multi-billion dollar companies around the world. Finally, like each of these languages has unique traits to distinguish them from the others (software transactional memory, list comprehensions, metaprogramming, oh my), Gosu has its own unique special sauce, which is its open type system, behind projects like JSchema and Ronin.

    All of these languages are very nice, and the programming world is a better place that they all exist. Just wanted to let you know there’s another one at the party.


    1. Martin Post author

      I’ve come across Gosu in the past. While I like enough to have had a play with it, it’s another one that seems to lack the secret sauce that propels it into general usage. It has all the feature that could make it great but it’s impossible to claim that it has any industry buzz. While buzz is a crappy concept to judge a language on, the fact that it is not used by behemoths (and darlings of the conference scene!) like google and twitter who when they highlight their Scala usage do so knowing that it will drive the uptake of this language.

      1. David Ventimiglia

        I get that Gosu doesn’t have the industry buzz of say, Scala, Groovy, Clojure, and even JRuby and Jython. That’s something I’m trying to address by alerting this blog post’s author to its existence. As for whether you’ll know that a language has “special sauce” when it’s been propelled to general usage, by that measure the jury is still out on all of the non-Java languages, none of which (yet) enjoys widespread acceptance. Gosu may not be used by Google and Twitter, but then again it is used by some pretty big enterprise companies, who run it, program in it, and file bug reports against it. Anyway, just my $0.02. Cheers.

  2. Pingback: Scala, Groovy, Clojure, Jython and Jruby and Java: Languages by Jobs

  3. Brad Wood

    I’m a bit disappointed to see ColdFusion (CFML) overlooked here. Even though it started as tag based and written in C++ back in 1995, it was released with a full rewrite in Java back in 2002 (Before Scala was even officially released) and has matured to a modern scripting language featuring Java interop, closures, dynamic typing, and OO patterns. It is regularly updated, open source (via Railo) and embedded in government and enterprise more than people realize. I consider CFML to be one of the first big JVM languages and just as popular as Groovy, Scala, Clojure and jRuby. (On the Tiobe index, Scala is #42, Groovy, Clojure and CFML are in the #51-#100 list, and jRuby doesn’t even rank. CFML would do even better on Tiobe if they’d stop stubbornly refusing to use “ColdFusion” as a search term) CFML remains a highly useful and productive platform and it’s a shame so many refuse to recognize that.

    1. Martin

      I kind of agree with you Brad. I remember the announcement that CFML was moving to a Java backend and thought that it was a very attractive option. Unfortunately it seemed to coincide with the rise of MVC, the fall of JSP and resultant push back against purely tag based frameworks/languages by the enterprise crowd (the outrageous success of PHP notwithstanding) which means that its brightest days are behind it. Certainly if you look at the job boards now it has dipped below Scala and Groovy and only going down.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.