[whatever] in JavaScript
Those last days, there has been a lot of fuss all around about Orto1 and HotRuby. I've also heard of a project of OCaml bytecode interpreter in JS, though I have no link for it at this time. Having some Java/Ruby/OCaml bytecode interpreted in JavaScript is quite nice, but I just can't see what's new/interesting about that.
There are quite a few other languages for which a JS interpreter is available: Basic, Scheme, Lisp, Prolog. Even Javascript can be interpreted in JS using Narcissus2. If this is not enough for you, I can add Brainfuck or even other esoteric languages.
I guess you'll say that all of those bring nothing interesting to the browser and that using compiled bytecode instead of parsing/interpreting source code is much faster. The latter can be easily forgotten, what about an x86 interpreter3 ?
Nevertheless, what is the easiest thing to write ?
- plain JavaScript, with a powerful library such as JQuery
- some bloated Java using cluttered GUI tools which were not built to output web components
A few years ago, writing some JavaScript meant dealing with cross browser issues. Today, JS is much more friendly, thanks to a lot of libraries. Moreover, I'm pretty sure the next move will be SSJS4, is there a reason (other than because I can) for porting Java/Ruby to JS ?
Leave a Reply