Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"What a human would write" isn't the purpose of the comparison. "This gets put in, this comes out" is. Did you not read the heading on the overview page? It doesn't even say "comparison" anywhere. The second paragraph talks at length about how CS compiles to readable Javascript. Then the examples show you that readable Javascript. You're missing the point.


Why do I care if the output javascript is readable? It's object code. I don't want to care about it.


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.


I don't think he is- I think he's saying that the point being made is the wrong one. It should be a comparison of the two languages because that's what people would want and expect.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: