What are the pros and cons of Coffeescript?
- by Philip
Of course one big pro is the amount of syntactic sugar leading to shorter code in a lot of cases. On http://jashkenas.github.com/coffee-script/ there are impressive examples. On the other hand I have doubts that these examples represent code of complex real world applications. In my code for instance I never add functions to bare objects but rather to their prototypes. Moreover the prototype feature is hidden from the user, suggesting classical OOP rather than idiomatic Javascript.
The array comprehension example would look in my code probably like this:
cubes = $.map(list, math.cube); // which is 8 characters less using jQuery...