March 22, 2012

Try and Tell Them That Today, and They Won't Believe You

I would have put long odds that JavaScript would someday rule the world. I remember it as an awkward and terribely mal-supported child in the early days; back when AOL was still around, and the primary purpose of JavaScript was to create a DHTML spinning clock that would follow your mouse.

Silently, over the years, and largely because every browser had to support it for the web to be useful, the JS runtime became the most ubiquitous runtime on the planet. Innovation happened in the background (my background); Gmail, CommonJS, jQuery, Node, etc... I mean, holy cow, the way to develop apps for Windows 8 will be HTML5 and JavaScript. Who would of thought?

But, it's still JavaScript. It's still indisputably an ugly, warty, and hastily thrown together language. Even The Good Parts can't really come up with that many good parts. JavaScript, as a language, is still unappealing to me which is simply a matter of taste. Obviously, it's won and people are doing great things with it.

"Every now and then I feel a temptation to design a programming language but then I just lie down until it goes away." — L. Peter Deutsch

Enter CoffeeScript. A language that compiles to JavaScript. It's not perfect, but it's appealing to me. It still has some of the warts left over from JavaScript, and a few new of its own. Attempting to use it as a shield from learning JavaScript is a mistake -- you need to know JavaScript. Beware. CoffeeScript is still JavaScript. I find it's syntax pleasant and it's features helpful.

There are several debates as to whether or not it's useful (Rob Conery summarizes and links to some of the more prominent talking points in his own struggle). Personally, I don't care that there is a debate at all. I will use CoffeeScript when I can because it's appealing to me. There's room for different tastes, at least in my world.