Infrequently Noted

Alex Russell on browsers, standards, and the process of progress.

Comments for The Platform Strategy

Have you seen JSR-292?  It's a start, but seems to me they also need support for closers in the JVM before you could get dynamic languages to run straight on the JVM.
by Michael Tildahl at
hey Michael,

So a hotswap operation starts to scratch the surface, and I hope it succeeds. Folks really get defensive when you bring up continuations and non-local return. There are some proposals floating around for perhaps doing more than putting lipstick on the pig ( and, but until we get something substantial like real VM-level support for enclosure, it's gonna be hacks on top of hacks (as it is now in JRuby, Jython, Groovy, and Rhino).

I'm tempted to see what it would take to bootstrap Java on top of Parrot. At least it's designed for this kind of (highly productive) workload from the ground up.


by alex at
alex, i am puzzled by your comment regarding perl's portability (i cannot speak to the others with confidence). by "not minding their C dependency chains", what do you mean? perl compiles on literally dozens of platforms, and correct perl5 code should likewise function on those platforms. of course bugs have arisen over the years, but fewer and less pernicious than those in the java world. oddly enough it is the closed nature of the jvm that has precluded its expansion to many of these same esoteric platforms...those interested parties moved on to projects like gcj et al long ago.

as to the jvm becoming the pre-eminent vm for dynamic languages, i have my doubts, its a different problem that demands a different solution, and it is unlikely that a critical threshold of developers will shift from their native execution platforms (perl5,python,ruby) to help push forward a jvm-based alternative.

personally, i don't want a platform. i want standards and protocols. let me figure out the best implementation as i size up my problems individually. sometimes it is lua (i need a tiny runtime). sometimes it is haskell (i want the type system to nanny me). sometimes it is perl (regexes).

by grumpY! at
hey GrumpY!

What I mean by "not minding their C dependency chains" is that instead of doing the Java thing and getting all bent out of shape about potentially non-portable C dependencies, these languages just went ahead and built out the API's that matched the underlying libc semantics without worrying about it too much. The Win32 stuff got filled in in time, and everyone lived happily ever after (as you point out). They used the ubiquity of a good (enough) standard C library to swiftly beat Java to any number of punches. As you probably know, I'm partial to Python over most other things, and the fact that my dusty memories of glibc man pages continue to serve me well when I ask myself "how do I do X?" in python continues to make me smile. What I'm suggesting is that for the millions of folks who know Java, wittingly or not, the JVM-as-platform hosting better languages could provide a similar advantage. I'm not saying it's potentially the best way forward, but if I were in Sun's shoes, I'd at least be throwing money at it.

I totally agree that Sun has f'd themselves repeatedly by not opening up java development.

As for the JVM as a basis for other languages, Sun could have made the JVM a much more inviting place for dynamic languages quite some time ago had they cared to. It's not obvious that by better supporting dynamic languages Java will get back whatever mojo it may have had, but frankly anything would be better than the slow, self-imposed death spiral it's now in.

Java set out to raise the average, and it has in many ways done that. It's not a way of working that I'll ever willingly subject myself to, but insofar as I appreciate that it's good in the aggregate that average programmers be writing Java and not C or C#, I support it. I'm pretty over trying to convince average programmers that they'll be tons better with Python or Ruby. They probably won't be. What worries me is that "raising the average" got confused with "defending one approach for raising the average", and that Sun seems to have lost the plot of whatever good they were doing for the world.

Hopefully that clears up some of my muddied thinking.


by alex at

i agree with your assertion that proselytizing to java programmers has little value. i always tell people to code in the highest level language they can get away with that they are also experienced with. for the ten year expert in java, he will get to a solution faster than were he to try ruby.

as to the runtime issue and the appropriateness of a vm for a static-typed (not to be confused with strongly typed) language like java for tools like python is up for debate. in the long run, moore's law solved the issue - any language on any vm. until then, it is worth noting the differences. haskell, for example, does no runtime type tagging - the compiler precludes it.

by grumpY! at