Andrew J. Bromage
3 min readJan 6, 2016

--

I have had to write JavaScript for a living, both client-side and node.js. This picture explains my feeling on JavaScript better than any 1000 words ever could: http://engineering.wix.com/wp-content/uploads/2015/04/mIuuwgx-1024x576.jpg

How slim a volume is “Beautiful JavaScript”? I don’t know, but I know how thin I’d make it.

Don’t get me wrong, the beautiful parts of JavaScript are indeed beautiful. Even though it doesn’t look like it, JavaScript is very strongly inspired by Scheme, which is one of the most beautiful programming languages ever made. Don’t let JavaScript’s clunky syntax fool you, under that extremely thin veneer is an extremely clean language with elegant semantics. You can’t even say that of Python.

Having said that, I have some specific nits to pick.

JavaScript is a single, stable language […]

Hahaha! Oh, wait, you were serious?

Nothing could be further from the truth. JavaScript, in the real world, is a horrific mess of incompatibility. Any nontrivial piece of JavaScript generally has to be ported to various browsers.

Admittedly, some of that is due to incompatibilities in how various browser vendors interpret the HTML standards. But some vendors just haven’t updated their JavaScript VMs to a recent version of the standard.

Yes, I said “JavaScript VM”. That’s because…

To run Java, the client must also be running the Java Virtual Machine (J.V.M.).

…to run JavaScript, the client must be running a JavaScript virtual machine. It just so happens that these are built into most browsers, but if you want to run anything stand-alone, you need to get yourself one. The current edition goes by the name “V8” (same as that delicious salty vegetably goodness).

[Haskell] is also a functional programming language which, like Latin, is considered “dead” and referenced only in historical texts. Yes, it is useful to learn Haskell in order to understand the context of programming today, but not for making useful products.

Where does one start with this? It’s a beautiful rant, but like all rants, it’s trying to make a point, not necessarily tell the truth.

Haskell is not “dead”. If you write code for a European bank, there’s a pretty good chance that you’ll be writing Haskell. Some of the hardware in your pocket right now may well have been designed and tested using Haskell.

Haskell is not yesterday’s language, it’s tomorrow’s language. By this I don’t mean that you will likely be using Haskell (unless you work for a European bank); Haskell’s unofficial motto is “avoid success at all costs”. Rather, the next cool feature in the programming language that you will be using will probably have come from Haskell. That’s because Haskell is the premiere test lab and proving ground for programming language research.

That doesn’t mean you should learn it as a first language. Although if you’re studying computer science, as opposed to web development, it’s one of the best choices. It’s not like Latin, it’s more like the Large Hadron Collider. It’s a 20+ year old design, you probably nave no need to use it, and it’s mostly mentioned in academic publications. But practically nothing beats it for awesomeness and futuristic-ness.

More seriously, functional languages are only becoming more important as time goes on, because functional languages appear to be the easiest way to scale to multicore/cloud/massively parallel. The one to look at right now is Erlang, which is behind Amazon cloud services, Facebook chat, WhatsApp, many online/social games, and routes most of the mobile phone calls in the world.

But even more to the point, JavaScript is a functional language. It only just got the syntactic sugar for it last year (meaning, of course, that your browser doesn’t support it yet; “one language” indeed), but it’s always had the right semantics and, indeed, this is one of its key selling points.

Having said all that…

[…] that Paul Graham guy seems kind of out of touch, don’t you think?

Yes. Yes, he is.

--

--