JVM musing.

Oct 01, 2009 13:55

Java is dead, but you'll learn to love it(via Hacker News).
Some of this boils down to Java-the-language vs. Java-the-virtual-machine(JVM).

I should probably just stop writing about Java, because I think I've said everything I have to say about it, but I figure it won't hurt to reiterate some of them. The biggest one is that if you care about open platforms the JVM is one of the few mainstream games. Will something sweep it away in the future? I hope so, but if I had to really put money on it, I would wager that the thing that pushes the mainstream away from Java will be a "new" language that folds the insights available in the current avant-garde languages(everything from Erlang to Haskell). I will admit it might already exist, or might even be one of those languages, but I suspect we will all be surprised.

Of course, the JVM is an avenue for allowing surprising language experimentation, and I even think the Java-Java confusion is helpful here.

Paul Graham has pointed out(in an essay a long while ago) that on the server you can get away with running whatever you want(and for Graham, anything = lisp), and I think the JVM serves a role similar to that. After all, via Clojure you can write in Lisp on the JVM, with the added bonus of saying you are writing "in Java". A similar trick can be played with Scala for getting an ML'ish/Haskell'ish variety in the mix. And I haven't even mentioned stuff like JRuby(Which is, apparently, the Ruby of choice for production deployment).

Now I tend to use a lot of "Java the language" but that's not even fair, I write a lot of code generator/compiler-like tools, and so what I use is more like "Java + some odd ball semantics"(on that note, I have now been told I reinvented Smalltalk, and I will be proud of that fact, whether I am supposed to be or not...). Anyway, at this point, I will be bringing Scala into the mix the next time I start a project.

Of course, I didn't mention .Net and the whole CLR. Ultimately, what scares people off is the fact that its "Microsoft Open". On some level, I'm willing to believe MS is reformed, and in all likelihood is the "The New New-IBM"(with Google and Apple doing a whole Tag-team of evil, and of course "Old IBM" was the original evil empire...). The JVM is, on the whole, an open platform.

Now did I say that any of this was the best? Nope, not at all. I was just reflecting this morning on how much I need a real tail call optimization and how little I want to do it the "hard way", and in some ways, I know more about pain than many, having written a "nice" combinator library for generating HTML in Java-the-language(one reason alone to switch to Scala, that code would wilt away into something far more pleasant to read... although its mostly the types that are hard to write down, with the anonymous classes definitions being a close second).

jvm, java, open platforms

Previous post Next post
Up