29 November 2007


“Write once, run anywhere” I’ve always been a bit wary of that slogan. Sure, the Java virtual machine (like the many VMs that came before it) is fairly easy to port to any platform, but those platforms almost all have a C compiler first. (In fact, the JVM for most platforms is written in C.) So this doesn't really gain you much. The real issue for cross-platform development is standard APIs. That’s the hard part. The JVM itself always gets ported quick, but sometimes you never get all the core APIs ported. Oh, a standard ABI is nice, but that’s really just icing. Java is perhaps a bit better off than many languages when it comes to simply having cross-platform APIs to be ported. I think there are at least a few languages, however, that fare at least as well as Java in this area. In the end, Java is no more cross-platform than any other language. It happened that, for a while, enough people (or enough big companies) cared enough about Java that it did end up being a half-decent cross-platform option for a while. Because enough effort was expended, not because anything about it was particularly better suited to the task. I’m distant enough for the Java world now to not be sure how the situation has changed, but I sense that it may be changing.

No comments: