TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why Do All the Great Node.js Developers Hate CoffeeScript?

25 点作者 roh26it超过 12 年前

23 条评论

raganwald超过 12 年前
I've been accused of writing linkbait-y titles in the past, such as "CoffeeScript isn't a language worth learning."<p><a href="https://github.com/raganwald/homoiconic/blob/master/2011/12/jargon.md" rel="nofollow">https://github.com/raganwald/homoiconic/blob/master/2011/12/...</a><p>So I suppose I'll have to just say that looking at the article itself and argue the content rather than the packaging. So here's the premise: A bunch of great JS developers aren't also CS developers.<p>Possibility #1: Correlation == Causation. Writing CoffeeScript rots your brain and makes you unfit for writing great Node.js code.<p>Possibility #2: Writing great Node.js warps your brain such that CoffeeScript is unpalatable.<p>Possibility #3: Writing great Node.js code means you're very comfortable with JS itself and your tool chain, and thus you look askance at <i>any</i> switch.<p>I'd say that both #2 and #3 are far more likely than #1. Neither of them imply that you shouldn't use CS today if it seems appealing.
评论 #4854623 未加载
tmcw超过 12 年前
Great node.js developers are writing libraries, not application code, and they see a difference: libraries are abstractions that try to build upon as little abstraction as possible, and attempt to integrate with as many 'things' as possible.<p>CoffeeScript's advantages - clarity and concise code - are outweighed by the feeling of building on an abstraction, and narrowing your contributor base. This feeling may be increasingly inaccurate: a lot of people write coffeescript, it's pretty well integrated nowadays.
评论 #4854579 未加载
account_taken超过 12 年前
I don't get it. Look at Jade, Stylus ... pythonesque isn't it. The same arguments that are made against CoffeeScript certainly can be argued for those sugar syntax alternatives of HTML and CSS respectively. Some will argue ad nauseum for not using semicolons and then hate on CoffeeScript.<p>I've had no problems debugging or understanding CoffeeScript and while I'm not at the level of a Jon Resig, I can more than hold my own with Javascript. CoffeeScript is just syntax and generally safer than plain Javascript. It will declare vars for you if your forget. It will use an optimized for loop. It will put a wrapper around code to minimize leaks ...
评论 #4854591 未加载
jrajav超过 12 年前
TL;DR: Several high-profile Node.js developers seem not to have used CoffeeScript for any of their public projects (unless you count forks). In addition, some unspecified expert Node.js devs (perhaps the same ones, perhaps not) made an unspecified joke involving CoffeeScript on a podcast. Therefore, all the great Node.js developers hate CoffeeScript.<p>I'm not arguing what the article seems to circle around to near the end - that CoffeeScript is worth trying - but its nominal premise seems a little shaky. Perhaps those developers simply feel as I do, that Javascript syntax is fine and there's not that great of an incentive to switch. I actually like braces and semicolons, and I definitely prefer function literal syntax to arrow syntax.
评论 #4854241 未加载
mratzloff超过 12 年前
I love CoffeeScript. But then, I am well-versed in JavaScript. People who don't understand scope, lambdas, prototypes, etc. should stick to JavaScript, as CoffeeScript obscures some of that. You really should understand what's going on behind the scenes.<p>Which makes it all the stranger that experienced JavaScript developers seem to avoid it, while less experienced ones embrace it.<p>My main gripe with CoffeeScript (there are a couple, but here's one) is code organization/readability when a method takes multiple functions as arguments.<p><pre><code> foo -&#62; bar() baz() quux() , (error) -&#62; throw error if error </code></pre> That does look a bit odd, and you run into these a lot when you're using caolan/async. You can avoid this by avoiding anonymous methods, but with so many callbacks in Node.js that is probably less readable.
评论 #4854701 未加载
评论 #4854558 未加载
评论 #4854333 未加载
Xcelerate超过 12 年前
I really love CoffeeScript. Javascript has some great programming concepts within it and CoffeeScript makes these more elegant and easy to use. The reduction of needless syntax is also a boon to me.<p>In fact, I've been using CoffeeScript to postprocess data from molecular simulations (supercomputer output). It's about 3x less code than an equivalent C program and requires a lot less thinking so I can get things done quicker. But I tend to use CoffeeScript in a functional style (which in my opinion is the best language paradigm for handling a lot of data).
dmethvin超过 12 年前
There are "systems developers" and there are "applications developers". The two groups often use different tools, so JavaScript vs CoffeeScript isn't much more surprising than C vs C++ or Win32/COM vs .NET for that matter.<p>Systems developers provide services for other developers; generally they want to minimize dependencies. It doesn't make sense to write foundational tools in CoffeeScript unless all the clients of those tools will be written in CoffeeScript as well. Otherwise you're just adding complexity to their projects and making them harder to debug.
评论 #4854549 未加载
dschiptsov超过 12 年前
Because CoffeeScript causes a cognitive dissonance by a) Attempting to address Javascript's shortcomings. b) Shows how much more comprehensible a well-designed language could be. c) Shows what one smart guy with a deeper CS knowledge and good taste could do.)
Weltschmerz超过 12 年前
Personally, I would want to understand JavaScript before moving on to some abstraction. The official Node.js documentation is written in JS, etc.. Then, once I am totally capable with JavaScript, there just isn’t a great incentive for me to learn another language to code on top of the same environment. I’m very happy with JavaScript. CoffeeScript has become an instant turn-off to me, and I think this sentiment is common in the community. If someone asks for help in the IRC channel, I just can’t offer a thing. And usually no one can. I’ve seen many calls-for-help that fell on deaf ears because few people are willing to learn CoffeeScript for assisting a fraction of the community. Why do I hate CoffeeScript? Because I like helping people. :( This is my personal history, and you may notice that I am totally ignorant of any benefits that CS may provide by way of being more concise, or linguistically harmonious.
geuis超过 12 年前
Quote: "Having defected from Rails, I love CoffeeScript."<p>This is a common reason I've heard. Here's the bottom line, CoffeeScript is not javascript.<p>Suppose you want to speak Japanese but only know English. Google comes out with Translate 4.0 that does realtime translation on the fly. Great! Now you can speak Japanese, right? No.<p>Most of the devs I've personally interacted with that like Coffeescript are conversely bad at javascript. Admittedly this is anecdotal and only based on my personal experiences.<p>Learn javascript. Get a book, read some tutorials. Quit trying to squirm around just because closures make you nervous.
lnanek2超过 12 年前
This is like analyzing some of the huge Java projects out there, noticing they don't use Scala, and deciding everyone hates Scala. Particularly with public projects, you want them as easy to use and simple and require as little as possible to get into them. Adding an extra language translation will not help with those things, especially if the language is not as common as the one it translates into.<p>I don't particularly like Java compared to some other options, but I still code in it most, simply because of the huge number of libraries and developers who use it. It's very difficult to write any big project by yourself, which means you need others, which means you need to not use obscure languages and other technologies that prevent working together. I much preferred writing for Linux PDAs than I do writing for Android smart phones, but if I did that, no one would use my stuff. :)
doomslice超过 12 年前
I like CoffeeScript. It makes writing some things in JavaScript a little bit easier and maybe even a little bit faster.<p>However, I don't like _using_ CoffeeScipt. It immediately shuts out the other 85%+ of JavaScript users who aren't familiar with CoffeeScript from reading and understanding my code.
agscala超过 12 年前
I dislike using coffeescript mainly because the language is <i>too</i> flexible. Being able to optionally omit a ton of syntax has led to some annoying problems that aren't obvious at first glance. This ambiguity is exacerbated by the way javascript is typically used (chained methods, nested lambdas, etc).<p>The other gripe I have is that debugging it is a pain in the ass since errors that come back reference the javascript code, not the coffeescript. Apparently this is a problem being worked on but it's still irritating.
评论 #4854205 未加载
评论 #4854761 未加载
steverb超过 12 年前
I'm not a great node developer, but I personally don't like CoffeeScript for the same reason I don't like UI interfaces for Git. I'm never sure what it's going to do.<p>Yes, I could go look at the output, or go really learn it, but if my goal is to produce javascript then it's just another leaky abstraction on top of something that isn't that hard to do by hand. If my choices were CoffeeScript or ASM, then I'd choose CoffeeScript in a heart beat.
buster超过 12 年前
I don't truely see enough benefits for coffeescript. 99% of the eco-system uses vanilla JS and i would like to stay in one "language" as much as possible.<p>In general i don't really feel comfortable with code-generating layers that abstract away what i want (and need) to know. I want to look into the Chrome Devtools, see "line 23 in bla.js" and correlate that to the source in my editor. Same reason i don't use all that less/sass/haml etc. etc.
grabastic超过 12 年前
I doubt that the CoffeeScript-haters would accept any compile-to-js language. Maybe it's language stockholm syndrome. ;)<p>But for me, JavaScript's shortcomings are far worse than CoffeeScript's.
pjmlp超过 12 年前
I don't care about any language that isn't natively supported in the browsers.<p>Not all browsers have support for source maps, and sometimes you really need to debug browser specific behaviours without having to debug generated code along the way.<p>Additionally in most teams I work on, it is often the case that besides myself no one even knows what CoffeScript is.<p>CoffeScript just adds more code to debug without any real benefit.
gavinflud超过 12 年前
I'm not a very experienced Node.js developer, but I have taken the time over the last couple of months to learn how to use it. I find working without CoffeeScript to be much more productive.<p>Then again, that may change when I get a lot more comfortable using Node. At the moment I just prefer to know exactly what's going on under the hood.
jtchang超过 12 年前
The reason I have not learned coffeescript yet is because I want to truly understand javascript. I feel that learning something more portable is the way to go. As I understand more javascript I think about what problems CoffeeScript is trying to solve.
JimmaDaRustla超过 12 年前
I'm learning the variable scope of javascript very thoroughly because it is powerful. I don't want to be hindered by shortcuts eliminating some of that power/understanding.
评论 #4854298 未加载
carsongross超过 12 年前
I question the premise.
todd3834超过 12 年前
I just love JavaScript
addlepate超过 12 年前
Jeez, there's the word "hate" again, second time this morning. What a bunch of drama queens we all are. Not particularly caring for a language or disagreeing with the premise for its creation is "hating". OK. And here it's even worse, because the author elevates these developers to the status of "great" and then paints the fact that they do not care for CoffeeScript as "haughty".