We don't want your coffescript
Are there people that seriously can't just read CoffeeScript as-is? Are there seriously people that can't scan through the CoffeeScript docs in about 20 minutes and pick up the language more or less?
The first time I saw CoffeeScript I immediately realized, oh, fuck yes, this is obviously better, and switched over to it immediately. I was productive with it instantly. Is it really something worth spending your time arguing about in either direction? I mean, it feels like telling someone to quit using their English accent or slang when you only understand American. Reading CoffeeScript code is hardly an effort in trying to decipher a compiler, almost all of CS's constructs do exactly what you expect if you'd have to guess, and where they are not obvious the non-obvious is due to Javascript's oddities, not anything to do with CS.
A better analogy for CoffeeScript is not another language, but it's Javascript slang or shorthand. It's a practitioners dialect of the language.
In my experience, it took essentially zero time to understand and be able to write simple CoffeeScript. Yeah, it will take some minor effort, but I see it as as parallel to templating languages in terms of your argument. It is faster and cleaner to write, and makes my life easier. I have hardly (I think never) needed to look at the output for debugging, but when I have looked out of curiosity it seemed reasonable, just with strange variable names.
Does anybody have examples of some CS code that only differs from JS in terms of syntax (eg. not defining a class or something) but compiles to something weird?
Coffeescript is a tool rather than a language. The syntactic conventions of this tool form a sort of "shorthand" for "best practice" javascript which happens to be also almost as easy to comprehend as javascript itself, amounting to a net productivity gain.
Given that, coffeescript is nothing beyond javascript. It does not have its own ecosystem, its own libraries, its own type system or any of the other baggage that comes with some other compile-to-javascript systems.
I'm not a CS lover, but I think most of your arguments are invalid. You say that you don't like CoffeeScript because it generates JavaScript code you don't understand. But do you understand what machine code will JS generate? No? Why? Maybe because you don't care... In general same thing applies here. If you need to debug generated JS, use source maps. This argument is not an excuse. Beside, CS is fairly simple in translating to/from JS. If you think it's not, try use dart2js ;)
I do love CS and I don't think people should answer js questions writing CS code. This is just rude. If you write your blog in CS, it's your choice, it just limits your audience.
Seeing such an angry reaction about CS is a good news, it just means that it is popular.
And for the ones who think CS is just pretty js, I suggest this reading http://aseemk.com/talks/intro-to-coffeescript
My biggest problem with CS is it's a space sensitive language that comnpiles to a space insensitive language.
Given that you'll typically interact with wild west JS that adheres to no spacing conventions, having to juggle strict spacing vs arbitrary spacing seems looks a headache.
You need to get more benefit from the abstraction than the cost. I couldn't find it, in cs.
I've made thousands of mistakes (on a daily basis it feels like). In 17 years I don't think I have ever once forgotten to put 'var' in front of a variable declaration.
> Always compile your code down to JavaScript before posting a question to StackOverflow, or replying to a blog post. You might even learn things about JavaScript itself, too.
I don't see author's enormous arrogance backed by any efforts to think about his reasoning.
You don't understand what asm.js is for, right? It is not meant for writing code in it, it is for compiling code from other languages to it. Well, sometimes you may need to write code in it for optimization. But the code you point to looks complicated not because it is written in asm.js, but because algorithm itself is compilcated. If you will rewrite it in any other language it will still contain all of these magic numbers and strange operations. In fact, almost any hashing algorithm looks like this. Just open wikipedia page for sha-1 or md5 and look at pseudocode.
I don't understand the claim the the outputted Javascript is hard to read. Whenever I have a problem with Coffeescript, the first thing I do is look at the output, usually in the Chrome devtools. If it doesn't compile, I'll yoink the offending code out and feed it into the linter at coffeescript.org. It is by far the least odious part of my workflow.
Part of me wants to claim that if Coffeescript is getting in your way, you're trying to do too much. I consider it a code smell and start to wonder what needs to get refactored.
What i've never understood about coffeescript is, since it compiles to javascript, why not just learn to write javascript in the idioms that coffeescript generates?
No one would have a problem suggesting that a developer who only used jQuery actually learn how to code in standard js without the syntactic sugar. CS doesn't compile to bytecode, it compiles to an actual, human-readable and editable language.
So why not just learn that style of javascript and save yourself the hassle of pretending there's a second scripting language for the web?
The author mentioned the ES6 problem, which I think is the only valid point made in the whole article (others are way too subjective).
Despite the hope that ES6 could be usable as-is, there's always the legacy syntax problem -- and the same applies to coffee-script (and its various forks). Some bad parts of javascript are going to stay in ES6 -- solved beautifully by pre-ES6 coffee, but due to the changes elsewhere we'd have to start over.
It remains unclear what we would be using when ES6 gains traction.
I'm happy to go head to head with this link baiter on who knows Javascript better :). I'm not going to take "you might even learn something about Javascript" from someone who says that a simple transpiler is a "black-box" that's totally beyond them.
p.s and a link-baiter than has a loading screen on their blog that crashes Chrome on iOS
TypeScript is the best bet if you want to write today's JS the ECMA6 (Harmony) style. It's not like CofeeScript.
Coffeescript has made me roughly 6x-8x more productive in writing 'javascript.' I can't fathom how anyone that spends more than 4 hours trying to use doesn't see the same results.
My biggest fear was debugging, but it was/has been absolutely no issue whatsoever.
Is there a mass CoffeeScript-answers-to-JS-Questions taking place on SO? Without even pointing to some instances of CoffeeScript-ers arrogance/mischief, ranting like that is not a nice thing to do.