Confounding: Sun vs. scripting languages

This post was also published in InfoWorld.

During my five year tenure at Sun, Graham Hamilton, the Java CTO, killed every initiative to run scripting languages on the Java Virtual Machine. These include 1999's "javab", which would have run Visual BASIC syntax on the JVM, and 2003's "Java 3", which would have supported optional typelessness for Java objects.

Clearly, the industry trend towards scripting languages like PHP and Ruby has finally had an effect, since Graham has recently sponsored JSR 292: Supporting Dynamically Typed Languages on the JavaTM Platform. The time lag here is similar to the time lag it took Graham to support SOAP in favor of RMI after a ton of resistance, which Sun paid for dearly when they had minimal impact in the development of the web service standards we use today.

It's great that Sun has finally decided to support scripting languages in some way in the next couple of years. However it is clear that this change was done in a very begrudging way, considering that Sun's James Gosling and Tim Bray have recently taken it upon themselves to start publicly slamming scripting languages!

James Gosling, March 12: There have been a number of language coming up lately," noted James Gosling today at Sun's World Wide Education & Research Conference in New York City when asked if Java was in any kind of danger from the newcomers. "PHP and Ruby are perfectly fine systems," he continued, "but they are scripting languages and get their power through specialization: they just generate web pages. But none of them attempt any serious breadth in the application domain and they both have really serious scaling and performance problems.

Tim Bray, February 21: So here’s my problem, based on my limited experience with PHP (deploying a couple of free apps to do this and that, and debugging a site for a non-technical friend here and there): all the PHP code I’ve seen in that experience has been messy, unmaintainable crap. Spaghetti SQL wrapped in spaghetti PHP wrapped in spaghetti HTML, replicated in slightly-varying form in dozens of places. Everyone agrees on PHP’s upsides: it’s written for the web, it’s easy to deploy and get running, and it’s pretty fast. Those are important advantages. And I’m sure that it’s possible to write clean, comprehensible, maintainable, PHP; only apparently it’s real easy not to.

Yet in January, James Gosling states in a interview that "LAMP has certainly become quite viable."

What would be much more helpful is if Sun finally open sourced the Java Virtual Machine so that scripting languages could organically adopt a common JVM. With some leadership on Sun's part, Java and LAMP could merge onto a common virtual machine, and both would benefit greatly.