Re:Mozilla, WebKit To Support Debugging CoffeeScript and oth...
by wisty on Tuesday August 09, 2011 @03:21AM
(#2863253)
I agree. Have a look at hallo (a really basic inline editor). The coffeescript (https://github.com/bergie/hallo/blob/master/examples/hallo.j...) is 236 lines, including about 60 lines of comments. The javascript is 208 lines, with no comments, and extremely clean (https://github.com/bergie/hallo/blob/master/examples/hallo.j...).
I think the big advantage of coffeescript is it gets rid of the whole "implicit global variable" thing. It's not a completely new language (like pyjamas - a python-js converter) just bit of syntactic sugar, which happens to make mistakes a little harder.
Re:Mozilla, WebKit To Support Debugging CoffeeScript and oth...
by bergie on Tuesday August 09, 2011 @03:44AM
(#2863294)
Hi, author of Hallo here. Thanks for the mention!
Major reason for the way Hallo is commented is because I'm using Docco for API docs: http://bergie.github.com/hallo/docs/hallo.html
Emacs mode[1] from Github co-founder Defunkt also makes it really easy to compile a single method/function, so you can easy get the hang of how the compiler works.
But this is great news for production js, which is usually minified, and for other languages, that may not compile down to such a clean js.
[1] https://github.com/defunkt/coffee-mode