3 ms·
As a year-long CoffeeScript user, I have a few points to rebut: debugging workflow: he makes a long list of bullet points, when in practice you can find the er
by ricardobeat 15y ago
As a year-long CoffeeScript user, I have a few points to rebut:
debugging workflow: he makes a long list of bullet points, when in practice you can find the error directly in your coffeescript code 90% of the time, since you have a clear image of what it's compiling to and errors tend to happen on the piece you're working on. Hopefully source-mapping in Firebug/Inspector will be ready in a few months and end this discussion.
"We Process Images and Symbols Faster than Words": It has been demonstrated that the understanding of text is based on the same principle, we don't "read" words, we identify them. and and or are as much a symbol as == and && (which you still can use if you think they are more visible).
"ugly syntax": the examples are ugly. Don't use a trailing if for long conditions, don't create huge one-line comprehensions. You can do worse in javascript.
if five and six and seven
doSomething()
"bad parts": every language has bad parts, but the example is just bad practice. Just because you can omit return and start an object literal without indentation doesn't mean you should.
getUser = (id) ->
dfd = $.ajax
url: "users/#{id}"
format: 'json'
method: 'get'
return {
url: url
promise: dfd.promise()
}
"Significant White-space Means CoffeeScript Will Always Be Compiled": what? No it doesn't. You can compress coffeescript, you can't minify it.
Readability is not a strength of most javascript code out there.
- ricardobeat 15y agoComments are welcome.