The original promise of Java in the 90’s was to provide a ubiquitous write-once, run-anywhere platform for applications. With the rise of network-centric computing, where applications were increasingly delivered over the web rather than in shrink-wrapped boxes, the need for such a platform was growing tremendously. For numerous reasons, Java failed to live up to its original promise (although has successfully thrived in other server-side roles). But fast-forwarding to 2011, we ironically see that Javascript (long considered a toy language for gratuitous visual bells and whistles) nearly perfectly realizes Java’s original promise.

Because of its sheer ubiquity, immense resources have been thrown at Javascript interpreters in the past decade, resulting in extremely efficient JIT-based implementations (c.f., Google’s V8, which powers Chrome and node.js), to the point where it is now among the fastest dynamic languages around. Because of its ubiquity and highly optimized performance, it is increasingly being used as the underlying platform for complex applications, even those not hand-written in Javascript.

It has been referred to as the “Assembly Language of the Web“, because it is used as the target output for various compilers (e.g., Google’s GWT, CoffeeScript, Pyjamas). More radically, Emscripten actually provides an LLVM->javascript compiler. Since LLVM is in turn an intermediate format (IF) that can be generated with gcc from a variety of languages such as c/c++, this means Emscripten effectively allows c++ code to be compiled to Javascript! And taken a step farther, since interpreters for many interpreted languages (such as CPython for Python) are themselves written in c, which can be compiled to LLVM, which can be compiled to Javascript, this means languages like Python can be interpreted with a pure Javascript-based interpreter. It will be very interesting to see how this flexibility will influence the future of languages for client-side computation. But Javascript seems firmly entrenched as the base layer for making it happen.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s