16 ms·
I still don't understand why I would want to use CoffeeScript when I can just use JavaScript.
by kennymeyers 15y ago
I still don't understand why I would want to use CoffeeScript when I can just use JavaScript.
- aaronbrethorst 15y agoAssembler and C. Java and Scala. Erb and Haml. CSS and Less/Sass. Edit: Walking and driving.
- unshift 15y agoAsm/C and Java/scala are unfair comparisons, since they're totally different languages with different structures and idioms. I just started using CoffeeScript for a project of mine and while it did clean up the messy look of the Javascript, it doesn't improve much upon Javascript feature-wise. I felt like I was still writing Javascript, it just looked a little better.
- jarin 15y agoIt does have some nice shorthand, but there is a lot to be said for having nice-looking code for its own sake.
- snprbob86 15y agoI've been writing CoffeScript daily for about 4 weeks now. On the first day, it seemed pretty minor. About three days in I was a believer. Now, when I write the occasional few lines of Javascript in my browser's console, it just feels so arduous to type. Whenever I pop open a Javascript library to read it, I feel like there is an assault on my eyes. I'm never going back.
- danenania 15y agoIt looks a LOT better, it requires a LOT less typing, and it saves you a LOT of stupid syntax errors and typos compared to brace-semicolon-comma-parentheses stew.
- jessedhillon 15y ago> CSS and Less/Sass This is the only comparison on your list that is remotely appropriate. In no meaningful way is it true that CoffeeScript:Javascript :: C:Assembler Javascript is not a low-level language resembling a primitive machine interface, and CoffeeScript mostly provides syntactic sugar, not new semantics or a different paradigm.
- TheEzEzz 15y agoJavascript is not a low-level language resembling a primitive machine interface, and CoffeeScript mostly provides syntactic sugar, not new semantics or a different paradigm. In order for A:B :: C:D it is not the case that A and C need to be similar, nor B and D.
- jessedhillon 15y agoI think you've misunderstood the comment. The comparisons made in the GP have very little in common. The Java:Scala distinction is not similar to that of ASM:C, and neither has a similar relationship to that of HAML:Erb. So there are many objections that can be made to the analogy, especially that the analogous relationships provided are not even analogous to each other! The sentence you quoted makes some assumptions of the reader's knowledge, namely that the reader understands "syntactic sugar" to be a process of trivial, linear transformation. The basis of the objection is not that Javascript is unlike ASM; the objection is that the relationship between Javascript and CoffeeScript is between a high-level scripting language and a trivial transformation layer of that language. On the other hand, ASM is a low-level interface and C is a paradigmatic shift (comparatively) in programming that introduces semantics which are divorced (to an extent) from their machine implementations. That relationship is not analogous to Javascript:CoffeeScript, as it is not nearly as significant.
- deleted 15y ago[deleted]