Compiling Javascript?

Okay Joel, interesting argument, and I sort of agree, but please don’t make silly stuff up to support your argument: http://www.joelonsoftware.com/items/2007/09/18.html

“You can follow the p-code/Java model and build a little sandbox on top of the underlying system. But sandboxes are penalty boxes; they’re slow and they suck, which is why Java Applets are dead, dead, dead.”

Well that’s not really true. Java Applets died because when Microsoft swamped out the Sun JVM with its own crippled 1.1 VM, nobody could realistically write to the much better Applet APIs that came out after version 1.1, so we either wrote crap AWT applets or ActiveX controls instead (a whole other world of pain and silliness). Also, the JVM is hardly “slow” these days, and is certainly faster than your average JavaScript engine.

“What’s going to happen? The winners are going to do what worked at Bell Labs in 1978: build a programming language, like C, that’s portable and efficient. It should compile down to “native” code (native code being JavaScript and DOMs) with different backends for different target platforms”

What, so JavaScript/DOM in a browser isn’t a frickin’ sandbox? Hello?! It seems ludicrous to add another language compiler layer on top of JavaScript/DOM, when you may as well write it in Java and “compile” it into an applet, which will have the same access to browser capabilities, require the same security restrictions and functionality sandbox, run a lot faster, and not require learning a new round of language, compilers and APIs.