/ JVM, LANGUAGE

Do we need other languages on the JVM?

It seems a trend has caught on and accelerated recently: every organization worth his salt in the Java ecosystem feels the need to create its own language that runs on the Java Virtual Machine. Side by side with legacy languages like Jython and JRuby, and along more promoted ones like Scala, Red Hat announced Ceylon and now it’s JetBrain’s turn with Kotlin.

Why so many languages?

However, the real question is not whether we need them (the answer is a simple 'no' since we created software without them), but why there is a sudden rise.

The developer perspective

Truth to be told, Java is an old-timer in today’s changing world. I began Java 10 years ago and I was not a pioneer at the time. Java the language’s evolutions has been hindered by:

  • a lack of competitors prior to .Net
  • a requirement of compatibility with older versions
  • a change process that encompassed companies with divergent interests

The mixing of the three makes any update on the language a real challenge. The last major change dates back to Java 5, which is End Of Life…​

So, instead of following the slow Java path, some developers prefer to use the highway to features not present in the language, such as Scala’s functional programming.

The new leader of the pack

Although I have a clear view why developers may want to use languages other than Java on the JVM, I can only speculate as why companies are releasing them. IMHO, big players in the Java ecosystem are afraid of Oracle’s control over Java and are trying to escape potential future costs of using Java. It’s a real risk considering Oracle’s stance on TCK as well as the Hologic fiasco.

Risks posed by other languages

Although the previous reasons are in favour of language diversification, there also are some strong arguments agains their uses.

Skills management

The Java ecosystem is very rich, and one doesn’t just qualify as a Java developer, but as a Java/Spring/Hibernate developer for example. In the event of a coming of other languages, recruitment will be even harder. And from a developer perspective, skills needed will be more widespread, thus leading to a decrease of knowledge in each individual language (no, you cannot be a master of many languages).

Loss of weight

Today, the market can roughly be divided into Java, .Net and PHP. I agree that others exist but frankly, they do not count as major players (Flex excepted but it’s staying on the GUI). If the Java language gives way to a bunch of other languages, however fantastic they are, the Java community as a whole will be fragmented into many tiny communities that won’t play nicely with one another. Notice that it’s beginning to happen if you read the comments on Ceylon, some definitely look like a war waiting to happen.

Other cases

In the previous sections, I deliberately left out some cases that are sensitive. I don’t want to start a flame war but since I tend to disagree with some of them, here are my counter-arguments.

LOC

Some complain about Java verbosity and choose a language that will make them write (and read) less code. Although I agree that it’s more maintainable to write 10 LOC against 100, I don’t see a problem in writing 15. I respectfully remind everyone that not every developer is top-notch and that writing explicit code (and reading it) goes a long way toward having maintainable software.

For those obsessed with LOC-optimization, I gladly provide this contest.

Operator overloading

Java doesn’t have operator overloading. Again, this is not a problem, at least for me: this means I can count that 1+1 does what I expect, and not another circonvoluted operation. As a counter-example, just have a look at Scala Akka’s bang operator (for newbies, there are also bang bang and bang bang bang). Sure it’s short but you really need to know what it does. If it’s the only library you use, that’s fine; if not, you’re headed for a world of doubts.

Technical vs business

Only the future will tell but I’m afraid the trend is that languages going to go beyond a nice are ones that free developers from purely technical tasks with no business value, such as memory management, portability, persistance, and so on. Do the former two ring any bell? Java surfed on them. Powerful or hype are adjectives that managers don’t care about. Since they are in position to decide, I think that because a language can do more than another has no interest other than a educational one.

Conclusion

For now, my point of view is that negative points against all these new languages are not counter-balanced by positive ones. Of course, I’m a pragmatic by heart so I’m all ears if I’ve missed a point. In the end, though, only time will tell.

Nicolas Fränkel

Nicolas Fränkel

Developer Advocate with 15+ years experience consulting for many different customers, in a wide range of contexts (such as telecoms, banking, insurances, large retail and public sector). Usually working on Java/Java EE and Spring technologies, but with focused interests like Rich Internet Applications, Testing, CI/CD and DevOps. Also double as a trainer and triples as a book author.

Read More
Do we need other languages on the JVM?
Share this