Thursday, September 20, 2007

ParenScript for the javascript universal runtime

Probably what will be the most quoted portion of Joel Spolsky's latest article:

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, where the compiler writers obsess about performance so you don’t have to. It’ll have all the same performance as native JavaScript with full access to the DOM in a consistent fashion, and it’ll compile down to IE native and Firefox native portably and automatically. And, yes, it’ll go into your CSS and muck around with it in some frightening but provably-correct way so you never have to think about CSS incompatibilities ever again. Ever. Oh joyous day that will be.

Nikhil Kothari, whose Script# project produces javascript from C#, affirms Joel's observations, noting also that the Google Web Toolkit (GWT) was probably launched for similar compile-to-javascript goals, for Java.

My me-too: you can also show your Lisp love for the javascript runtime with ParenScript, a small Lispy language which essentially does the same thing as Script# and the GWT.

My first job, I wrote software using Common Lisp (with MCL). I haven't seriously programmed in Common Lisp since then, and perhaps for sentimental reasons, Lisp and its dialects still retain a special place in my heart. You can imagine my excitement when I discovered ParenScript a few months ago.

It does HTML and CSS, and promises to integrate painlessly with javascript libraries like Prototype and jQuery. You access AJAX functionalities from libraries such as these, if you didn't want to have to do your own. The only weakness is, it doesn't seem to have the same level of rich IDE support that both Script# (Visual Studio) and GWT (Eclipse) can leverage on.

0 comments: