Just because you can use anonymous functions does not mean what you need. Casting callback names often leads to clearer code:
some_descriptive_name = (url) -> dosomething() the_error = (err) -> console.log 'error occurred', err $q.fcall somecall .then some_descriptive_name.bind(@) .catch the_error
Or:
some_descriptive_name = (url) =>
If your functions are only single-line, then anonymous functions are fine, but if they are longer, then it is very easy to get lost in CoffeeScript spaces.
source share