Hacker News new | ask | show | jobs
by ori_b 5409 days ago
Why do I care if the output javascript is readable? It's object code. I don't want to care about it.
2 comments

Unlike environments like GWT or ClojureScript, coffeescript doesn't treat the JavaScript as an invisible target language. You do actually think a little about the JavaScript that your code is being compiled into (or maybe more accurately, translated into).

This makes CoffeeScript fit really well into the JS-centric environment that has grown up around tools like JQuery and backbone. It's also very easy to debug in the browser compared to the environments that are targeting JS as an object code.

Personally, I don't think of CoffeeScript as a fully independent language but, rather, as a way to write JS which is cleaner, more reliable, and more fun.

If you really want to turn JS into a black box (and there are some good arguments for that), GWT or ClojureScript might be better choices for you.

(I've been writing a bunch of CoffeeScript lately and loving it. I'm very anxious to try my hand at ClojureScript also. GWT has always seemed very unwieldy to me.)

You'd only care if you ever needed to interactively debug your app in the browser. So, unless you're a fan of old-school debugging (ie not debugging, just writing out to the console) you do care about how the javascript looks.