Welcome!

Java Authors: Elizabeth White, Pat Romanski, Adrian Bridgwater, Liz McMillan, Kevin Benedict

Related Topics: Java

Java: Article

What Does the Future Hold for the Java Language?

I think that it's possible to be a master of only one language

Before Java I was a Smalltalk guy. I remember switching from one language to the other and the tipping point that you reach when you’ve mastered the new language and how many months it takes, not to mention the years, to do really good design and know-how, which patterns to apply and how to avoid mistakes, understand performance issues, and so forth. I recently had to look at some Smalltalk code and realized that after spending a period away it was hard to figure out what to do – I definitely wouldn’t call myself a competent Smalltalk programmer anymore.

What’s my point? I think that it’s possible to be a master of only one language – either that or a Jack of all languages and a master of none. I like a nice simple flat world with only one language. Communication is easier and everyone can enjoy the shared experience it brings rather than having to constantly switch back and forth. When Java first came out, there was a rearguard action by the virtual machine guys to make Java run on Smalltalk virtual machines that, while they had pretty cool technology called the Universal Virtual Machine (UVM), was probably a sort of denial move to protect Smalltalk’s turf. It’s there in theory so people don’t have to switch syntax, but in practice it was a nightmare to code with JNI to bridge the two and a lot of horrible datatype conversion between primitive language types. To code Smalltalk running under Java or vice-versa you needed to be a master of both languages as well as have a strong head when it came to debugging virtual machine registries and heap stacks. Ugh.

The Microsoft guys, after initially bashing Java for years as being slow because it’s interpreted bytecodes rather than fully compiled, an accusation that’s mostly FUD because of JIT compilers and the fact that most Redmond languages compile to interpreted p-codes anyway, now preach the common language runtime (CLR) as the holy grail of programming. It’s not unlike the Smalltalk/Java hybrid UVM. In fact it’s exactly like it – it just happens to run Microsoft languages on it. It doesn’t have a lot of traction since it came out.

What bothers me now is that there seems to be a resurgence of the idea that virtual machines can do anything. Rather than focus on Java and what the language needs to move it forward, there is a lot of hoopla and fanfare about making JVMs to run Ruby, PHP, or other equally trendy languages, as well as technologies like Java FX, which itself abstracts programming to an even higher and utterly non-Java syntax. If this all occurs, what do we have left? We have a virtual machine that can run Java but can run other languages as well; we have languages that compile to Java but aren’t authored in Java; and we have something that has lost its value proposition and is now all but indistinguishable from its Redmond counterpart. In other words, we’ve lost the plot. For those of us who have to write code, I still maintain that having to be fluent and versant in lots of languages just isn’t that possible in practice and we’ll end up with lots of second-rate programmers writing poorly performing and badly designed code, not to mention the debugging nightmare as context and language switches occur all over the place at runtime. What’s it all for? Because the other languages are dynamic, or because the other languages are better for the web, or whatever? We should be fixing these in Java, not doing VM hacks and increasing complexity just to embrace these other languages that didn’t even exist a few years ago. There is nothing wrong with Java as a language that we can’t fix. I really believe this is where the focus of attention should be, rather than bloat and hack the JVM to become a Jack of all trades that will ultimately make the Java language suffer the same fate the Smalltalk language did.

History has awonderful habit of repeating itself, and if we don’t back Java as a language, rather than some kind of nebulous “Java technology” thing, we’re just dooming it to incognizance by diluting it with other languages and just increasing the entropy required to build good software.

More Stories By Joe Winchester

Joe Winchester, Editor-in-Chief of Java Developer's Journal, was formerly JDJ's longtime Desktop Technologies Editor and is a software developer working on development tools for IBM in Hursley, UK.

Comments (18)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.