Do Not Use CoffeeScript
2012-11-05
CoffeeScript is not a framework. It is used to generate readable, clean, tight and safe Javascript code.
Pros:
- Python style whitespacing
- Ruby styled lightweight syntax
Javascript:
var validate = function(form) {
var required_field_names = ['name','email'];
return false;
}
Coffee:
validate = (form) ->
required_field_names = ['name','email']
return false
CoffeeScript returns the result of the last expression in a function
validate = (form) ->
required_field_names = ['name','email']
false
Though there are many reasons to use CoffeeScript.The biggest reason I decided not to use CoffeeScript is debugging. When you debug your web app, you see javascript. What you see is not what you wrote.