A thought about the popularity of server-side JavaScript

January 20, 2014

One of the things going on these days is that an increasing amount of server-side web related programming is being done in JavaScript, specifically in node.js. Various sorts of people have various reactions to this, some of them negative. I've got some half-formed thoughts about this from an outsider's perspective, but for today I want to stick to one observation that stands out:

Node.js JavaScript is likely the fastest dynamically typed language that you can use on Unix today.

If you want dynamically typed plus speed, your options are not great on Unix right now. Straight Ruby, Python, and Perl do not really cut it. You could try JRuby or Jython to see if the JVM speed for Java has rubbed off on them, but that requires diving into the complexity swamp of the JVM and those implementations are somewhat second class citizens of those languages. Otherwise, for real speed you are looking at a statically typed compiled language: Java, C/C++, maybe Go.

(And the environment you get with node.js is attractive beyond simply speed. Node.js gets you a dynamically typed language on Unix that uses a world-class JIT engine for speed, is quite popular and thus well supported, and that has what I understand is an excellent ecology of packages for doing various things. It doesn't require compilation and has a repl for on the fly exploration. It just requires you to write JavaScript.)

PS: If you look really hard there is probably another dynamically typed language that runs on Unix and does so as fast as node.js (I suspect that there are some Lisp implementations that are in the same ballpark). But I don't think there will be anything that's anywhere near as well known or popular as node.js. And frankly that makes node.js a much safer choice.

Written on 20 January 2014.
« Some thoughts on structured logging, especially in and for databases
Fake versus real metaclasses and what a fully functional metaclass is »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Mon Jan 20 01:48:33 2014
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.