News for hackers. Stuff that matters.
Re:CoffeeScript -- You Are Totally Gonna Hate It by gmac on Saturday July 17, 2010 @11:11AM (#1523891)
I've recently been using CoffeeScript in conjunction with the Ojay wrapper for YUI (http://ojay.othermedia.org), which includes JS.Class ("Ruby-style JavaScript", http://jsclass.jcoglan.com/).

I've found the combination absolutely brilliant -- it recalls Ruby's creator Matz's promise of a language to "make programmers happy".

You get the expressiveness and brevity of Ruby, plus first-class functions, running in anyone's browser; and you get really well-thought-out event handling, AJAX and animation APIs.

I have only one serious pain-point with CoffeeScript: the Pythonesque significant whitespace. This commonly trips me up when providing anonymous function arguments to other functions (very common when assigning event listeners, for instance).

I guess the problem is that I never really understand exactly which whitespace is going to be deemed significant -- so maybe it's just a matter of documentation?

Re:CoffeeScript -- You Are Totally Gonna Hate It by jashkenas on Saturday July 17, 2010 @11:57AM (#1523980)
If you can show me a couple examples of places where the indentation tripped you up, I'd love to fix the documentation to explain them. Either starting a ticket, or gist-ing the examples here would be fine.

There was a question in #coffeescript last night about passing multiple anonymous functions into a function, and we came up with a couple of nice ways to write it:

http://gist.github.com/479249

Re:CoffeeScript -- You Are Totally Gonna Hate It by gmac on Saturday July 17, 2010 @12:14PM (#1524032)
Thanks. Obviously I've fixed the original problems now, but if I get a chance to try to recreate them I'll be in touch.

I should have mentioned that's the other thing to love about CoffeeScript: insanely responsive support!