JavaScript has a lisp

It's been a while since Slashdot was my regular hang out - so perhaps the demographic has swung radically - but I was amused (and a little bit incredulous) to see a stack of mis-informed javascript hate in the comments of an article talking about Harmony (TC39), the proposed next version of ECMAScript.

In the last few years or so, JavaScript has come out of the closet and revealed itself as a powerful (though, like any good hero, slightly-flawed) functional language. Many people still haven't taken to it and choose to continue writing in an OOP style that they were told was good and enterprise-y. That's not a bad thing - that C/C#/Java coders can force JavaScript to behave mostly-but-not-exactly like their familiar ol' imperative friends is testament to it's flexibility: JavaScript can easily pretend to be imperative, because it can do anything.

So you can force JavaScript to have classical OOP inheritance (rather than the prototypical inheritance that is true to it's heart) and you can go on pretending you're coding Java and swearing when something doesn't work like your used to. And you can keep on swearing when you inherit a pile of spaghetti code written by the newbie who used to have your new job.

But heck, the fact that a designer somewhere can pick up enough JavaScript to actually achieve their goal is fantastic. The fact that most JavaScript code makes you want to cry is not so fantastic - but it's the natural consequence of having all but a tiny fraction of one percent of available JavaScript tutorials written by people who don't get JavaScript.

Perhaps what's needed it to really cast off the ugly baggage that's holding it back. Harmony proposes some great new features, and the less certain "Strawman" proposal puts shorter function syntax, and arrow function syntax on the table - but I think if we're really going achieve some real understanding we need to simply rename the entire language LispScript.

Once JavaScript gets prefix notation, the transformation will be complete.