<< Tuesday JavaFX Quiz: What Will It Print? | Home | Firefox 3.5 Means Never Having To Say I'm Sorry (For My Video Format) >>

The JVM Is Not The Center Of The Universe!

If you follow the Java blogs and tweets in the last couple of years, you've heard the argument that the Java vitual machine is where the value of the Java platform is, and Java the language is mrely one language among many languages that allows programmers to write frameworks, libraries, and applications for the JVM.

And according to the stories, the race, of the alternative JVM languages—including Groovy, Scala, JRuby, Jython, Clojure, and others—to become the Java.next is on, and Scala is winning it, if the Java Posse is to be believed.

It is therefore not surprising that in the latest episode of the podcast, JavaPosse #262: The Week Of Controversies, Dick Wall raised the point that Google is leveraging Java in a different way:

Dick Wall [7:39—8:59]: Google has invested a lot of effort into doing Java language centric work. So Android compiles Java to Dalvik executable format. GWT takes Java and compiles it to JavaScript where it runs in various browser environments. And Google App Engine takes Java source code and runs it on a targeted subset of Java SE, minus some features like threads, background processing, and some of the core classes.

So it seems like Google is centered on the Java language. Now this is my point: Of all the Java landscape right now, the Java language is the least interesting to me, important for sure. But honestly why are they centered on Java the language and not Java the platform or more importantly Java the community. That just seems like a crazy thing to be concentrated on.

Java at this point feels like a language which is going into maintenance mode. Why this Java obsession? I think they are missing the much much more important parts of the overall Java landscape, which is the Java platform and the Java community.

And I can't get why they are so focused on the language. It's like they don't seems to get the other parts of Java right now, the more important parts of Java.

A debate ensued both in the podcast and in the JavaPosse Google Group:

While I agree with Dick that the Java platform (by which I assume he means the JVM plus the APIs) is a compelling one to develop and deploy applications, I don't share his puzzlement about the way Google uses Java the language to target platforms other than the Java platform (Dalvik, DOM, GAE, etc.).

One reason Dick gave for paying less attention to Java the language is that large scale innovation seems to have stopped for Java the language. However, that could be a very good reason for teams like those inside Google to adopt the language. After looking at all the alternative languages I mentioned above, my sense is that Java is still the undisputed easy-to-grok, easy-to-write, easy-to-read, and easy-to-maintain language among them all. Given the resources Google has, it is natural for them to experiment with targeting Java the language on different platforms. The era of the thou shall not separate the language, the virtual machine and the API has long gone. And the irony is that that policy has severely limited the reach of Java, as I blogged 810 days ago.

I believe the general Java scene is too much intoxicated in the belief that The JVM's the One True Virtual Machine!. It may seem that way from some perspective. However the history of computing teaches us that there is no One True Thing. Eventually, some of the less mature VMs will catch up with the JVM. And two or three, or even four, of them will dominate the computing scene for some time. By then, the single VM languages will look silly. Groovy and Scala are particularly in danger. Python, with its Jython, IronPython, and python-parrot implementations will win the day.

I see Java the language jumping out of the JVM sea and reaching the land of the lesser known but equally promising runtime environment as a crucial step for the survival of Java.

In case you don't know, Java the language already runs on the .NET platform, as well as the native (amd64, sparc, etc.) platforms.

The JVM may seem to be the center of the universe to some. But it really isn't. And it's Achilles' Heel is the topic of another post. Stay tuned...

Tags :


Re: The JVM Is Not The Center Of The Universe!

Scala is probably not in that great a danger: it actually has an older version available for .NET and the compiler generates it's own byte code, which is then transformed to JVM or CLR byte code. Still, it probably depends on the JVM a lot.

Re: The JVM Is Not The Center Of The Universe!

Well said! The religious praising is both tiresome and unimaginative to listen to. The JVM failed both in the browser and on mobile devices, deal with it. Who cares what's inside the Oreo, as long as it tastes good (both to users and developers).

Re: The JVM Is Not The Center Of The Universe!

And I'd note that the Java.next language you didn't mention - Fan http://fandev.org - does compile to .NET CLR. And Javascript, which I find quite intriguing.

Re: The JVM Is Not The Center Of The Universe!

Yes, the Fan language. I'm going to learn all about it tomorrow at the Lambda Lounge. Scott Bale is getting ready to explain it all.

Re: The JVM Is Not The Center Of The Universe!

"my sense is that Java is still the undisputed easy-to-grok, easy-to-write, easy-to-read, and easy-to-maintain language among them all"

Here's the problem. That's *your* sense. Okay. Good for you. The people embracing other languages would disagree that Java language code is *any* of those things. I happen to be one of them. I see Java language code and I usually want to throw up in my own mouth. My revulsion to the language is so strong that for many years I simply stayed with C++ (or occasionally OCaml or when on Windows C# - to *me* either of these is more preferable). It wasn't until the "low ceremony" languages started to crop up that I began looking at "Java" again. Coming from this angle, there's no value at all in the language. Its the readily available APIs that provide value.

Now to be fair, I don't give a rat's behind about which VM those APIs target (which supports what I guess is one of your points). As was noted, Scala (at least used to) also target the .Net VM. I'd still use it if it targeted the Qt APIs. What matters is that I get a language that is, to me (and I would guess other Groovy,JRuby,Scala,etc adopters), more all of the things quoted above than Java language is and that I get a reasonably complete platform on which to build.

Re: The JVM Is Not The Center Of The Universe!

> The people embracing other languages
> would disagree that Java language code
> is *any* of those things.

Here's the problem. That's what *you* think. Okay. Good for you.

There are 6 millions of us, and, what, 850 of you. I'm not saying that you are wrong. But until you spend the money and effort to have us all trained in Java.next, ten years should be enough, the situation remains in Java's favor.

Re: The JVM Is Not The Center Of The Universe!

The point, Weiqi, is that what you state as imperative fact is subjective, dependent on your point of view and your preference and where your coming from. That doesn't change because there are "6 millions" of you or just one of me (never mind that a great many people "spent money" to learn Java not because of some attraction to The Great Language, but because the *platform* was chosen from on high for the job at hand - and because at one time it was the only flavor available on the platform).

The other VM communities (.Net, Parrot, Mono, etc) all recognize that API (aka, the platform) is where the value is. To this end they *all* support multiple languages, allowing people with different language preferences to share in the common base.

I would postulate that, were there no other JVM projects out there, the Java community would be in a serious state of decline by now. We'll never know whether that's right or not because, thankfully, there are enough people out there who see value in the platform independent of the language to provide a healthy number of alternatives.

Re: The JVM Is Not The Center Of The Universe!

Good lord, "...I usually want to throw up in my own mouth.", talk about hyperbole. Here's the problem, *your* drama queen attitude about programming languages. Back on topic, thank you Wei for a another interesting article.

Re: The JVM Is Not The Center Of The Universe!

There's nothing drama queen or hyperbole about it. What is common practice in Java happens to come across as exceptionally bad taste to me and as a result I go to great lengths to avoid touching the language, as stated.

Clearly I'm in the minority here, but I stand by my assertion that the value of Java is in the platform and not the language. I need only point not only to the other JVM languages out there but also to .Net, Mono, etc projects to support my claim that on any platform its the API that matters.

Re: The JVM Is Not The Center Of The Universe!

> I stand by my assertion that the
> value of Java is in the platform and not
> the language

Just as you see value of the JVM when decoupled from Java the language, I see value in Java the language when (somewhat) decoupled from the JVM. That's all what my post is about.

Re: The JVM Is Not The Center Of The Universe!

Eventually, some of the less mature VMs will catch up with the JVM. And two or three, or even four, of them will dominate the computing scene for some time.

Maybe, but that's one hell of a catchup to do.

Sure, things like LLVM will hopefully help but you have to keep in mind that the Sun JVM ("Hotspot") has its roots in Smalltalk and Self. Both of them are extremely dynamic languages that require aggressive optimization techniques for good performance. AFAIK, a lot of that infrastructure is still there although you're not able to leverage that with the Java bytecode instruction set.

And lets not forget the achilles heel of any VM, the garbage collector. The Hotspot GC has gotten tons of real world performance testing and optimizations over the years. Last time I checked, most of the Open Source competitors (Mono, Ruby, etc.) were severely lacking in this area. Furthermore, if you look at projects like Parrot, you can see that it's not just the "JVM crazies" that see the benefit of using a single VM implementation for multiple languages.

I'm not saying the JVM should be the center of the universe but I do see the potential in fixing the limitations of the instruction set to support dynamic languages better. A ex-colleague of mine once said something along the lines of "the JVM is the new UNIX kernel" and I think there's some truth to it. And I think it's a real possibility people will accept the JVM just like they accepted the UNIX system call interface in the past. No, it's not perfect but it works and it has big enough installation base to make it extremely difficult for newcomers to get enough traction.

And I think that might have something to do with why Microsoft spent so much time and energy creating CLR which is more or less a incompatible clone of the JVM. The similarities to what they did with Windows NT when they were getting beaten up by the UNIX vendors in the late 1980s seem kinda obvious.

Re: The JVM Is Not The Center Of The Universe!

"the alternative JVM languages—including Groovy, Scala, JRuby, Jython, Clojure, and others... After looking at all the alternative languages I mentioned above, my sense is that Java is still the undisputed easy-to-grok, easy-to-write, easy-to-read, and easy-to-maintain language among them all."
I'm astonished by this, since it's the exact opposite of my conclusions. I'd be quite interested in reading about why you reached yours.

Add a comment Send a TrackBack