We don’t want your Coffee

A relevant ad will be displayed here soon. These ads help pay for my hosting.
Please consider disabling your ad blocker on Pony Foo. These ads help pay for my hosting.
You can support Pony Foo directly through Patreon or via PayPal.

An open letter to the CoffeeScript community.

You can follow the discussion on Hacker News.

This rant probably also holds true for TypeScript, and similar. Heck, even asm.js. I know asm is awesome in theory, but have you actually tried going through a piece of code written in that? It’s garbage, and you aren’t really supposed to do that to your everyday code base either.

Now, don’t get me wrong, I’m completely fine with you sipping your fancy coffee yourself. My problem lies with you spilling coffee on everything you do, or trying to force-feed coffee to everyone else. Your coffee is becoming an infectious disease, and you need to stop it from spreading. Languages like CoffeeScript represent a problem to the community as a whole not because the language is inherently bad, but because you assume everyone else understands that non-sense.

What? It’s not non-sense, it’s beautiful! It’s JavaScript.

Newflash. It isn’t JavaScript, it just compiles down to it. Stop trying to subjugate people on StackOverflow by answering their JavaScript questions with CoffeeScript code. Stop trying to get JavaScript help posting Coffee code we don’t understand.


The problem isn’t in the language itself. While I may not like CoffeScript personally, I celebrate the diversity, like pretty much everyone else. The issue is with people like yourself, who post things on the web as if everyone knew how CoffeeScript works. Sure, it compiles down to JavaScript. We get that. But we’re not going to learn your language, and it looks funny.

I don’t have to tell you things are bad, everybody knows things are bad. It’s like everything everywhere is going crazy, so we don’t go out anymore. We sit in the house and slowly the world we’re living in is getting smaller, and all we say is “please, at least leave us alone in our living rooms”.

So, I want you to get up now.


Did you know that some companies are in fact turning their back on Coffee, just because people don’t really know the language? The problem Discourse encountered was simply that they weren’t getting as many contributions as they expected simply because their JavaScript was obfuscated behind Coffee, reason enough for them to flip the switch and move away from CoffeeScript. The problem is clear: people who know Coffee should know JavaScript if they want to write decent code. The opposite doesn’t really hold true, the rest of the universe has no reason to learn Coffee, and those of us who don’t buy into its perceived value are left out in the cold.

I’m not even getting into the which one’s better? debate. I don’t really like the syntax but then again, I don’t care that some people do, either. Besides, others have typed pretty long articles on the subject. After all, the first non-procedural language I came upon was Visual Basic, which has the same_ish_ “human-readable” syntax style that we find in CoffeeScript, with gems such as one isnt two reminding me that once upon a time I, too, relinquished code quality in favor of blindly telling my compiler On Error Resume Next, an obscure construct in VB where it acted as if every single line was wrapped in a try/catch block. Oh, the joy of blindly and naively debugging code back then.

The problem with the child-like syntax is that it hides too much, making the code nearly impossible to read for un-caffeinated fellows such as myself. Not that we want to. This isn’t the case of all languages that compile to web-ready languages (HTML, JS, CSS).

Jade, for example, produces clean HTML that simply uses CSS selectors, in a syntax something very similar to what you might know as the Zen Coding. When you compare Jade with the exceedingly verbose nature of HTML, or XML, the benefits start becoming glaringly obvious.

Here’s some Jade

  li(ng-repeat='foo in bar')
    div {{name}}
        span Description
        span {{desc}}
        span Price
        span {{price}}

The HTML took me quite a bit longer to type by hand

<ul id='crocodile-items'>
  <li ng-repeat='foo in bar'>
    <div class='details'>

The pros to Jade start piling up when we take into account things like inheritance, mixins, JavaScript, and, well, the fact that you won’t be forgetting to close tags anymore.

In the case of Coffee, though, it’s as if it was the other way around. What the hell is happening in the JavaScript that gets compiled? I’ve no idea. To me, it’s a black box. I don’t like black boxes. They’re black, and cube shaped. And that’s about all I know about black boxes, they don’t tell me anything about what’s going on under the covers. Writing JavaScript code directly means we have full control over what we are doing, and that has precious value. One last thing. How are you going to incorporate ES6 when it comes around? To my knowledge, it’ll break CoffeeScript as you know it. That kind of sucks. It means you’ll either be stuck in a language that can’t exploit all of the latest features in JavaScript, or you’ll have to change tons of code in order to be back at square one. Me? I’d rather not be boxed into feature lockdown by the same language that’s pretending to help me write better code.

My suggestion to you isn’t even to stop using CoffeeScript, but to be more thoughtful of those who don’t know anything about your pretty language. 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.

Comments on Hacker News.

Liked the article? Subscribe below to get an email when new articles come out! Also, follow @ponyfoo on Twitter and @ponyfoo on Facebook.
One-click unsubscribe, anytime. Learn more.

Comments (32)

Qawelesizwe Mlilo wrote

Hi Nicolas, man I love your blog and your JS skills. I couldn’t agree more (with all due respect to CoffeeScript ofcause).


Maybe I missed your point. But the fun thing about this post is that you can replace “JavaScript” with “Assembler” and “CoffeeScript” with “C” and “2013” with “1973” and it will be the same. You should watch “The Future of Programming” by Bret Victor.

Nicolas Bevacqua wrote

The point is mostly about some CS people being inconsiderate when posting answers written in CS to JS questions on SO, or asking JS questions but showing CS code, very much like when someone posts a question or answer in spanish, or french.

The JS/ASM CS/C comparison doesn’t make any sense. ASM is completely unreadable to most mortals. JavaScript is just not that pretty to those who don’t like it, this is apparently the case of some Ruby and Python developers.

Jeffrey Gilbert wrote

ASM.js is meant to be generated by other languages. It’s not meant to be read. The point of it is for programatic performance gains, not readability. It’s math based. So unless you read nothing but math fomulas and arrays all day, the point is moot.

And coffeescript is its own language, so if there are going to be complaints about it, they should be directed at the language and its caveats, not a rant about hating preprocessor languages because they’re not pure enough.

Brook Monroe wrote

“…coffeescript is its own language.”

Denied. I agree with Oscar Godson**–it’s transpiled, not compiled. (It’s not even interpreted.) At best it’s a dialect.

I’m not sure what problem it solves, either. Most–if not all–of the examples on the CoffeeScript.org site of how CS is better or easier to write than JS can be resolved by a useful JS abstraction called a ‘function.’ I’ve yet to grasp the brilliance of conditionals as postfix operators. (I don’t use RPN calculators, either.)

** Okay, there’s a place where I disagree with Oscar–I actually like arrow functions. But that aside…

David Hanson wrote

“This rant probably also holds true for TypeScript” <<<< For the record it doesn’t.

Johan Steenkamp wrote

Agree 100% - if I see coffeescript I just move on. As you say - I like to know what’s going on. Nice contrasting with Jade.

Patrick Mesana wrote

I understand what you mean, but I don’t agree completely on your comment about black boxes. Javascript is a black box in a way, abstracting lots of memmory management for you, it is not alway implicit what the language does for you but it doesn’t seem to bother you. V8 also does a lot of complicated hidden improvements. I don’t see coffeescript compiler doing very complicated stuff, you can learn about it in 1 hour or less. Anyway, my point of view is the language is useful at application/testing level, maybe less for apis or libs where you need a better grip on the code you want to expose.

Leonid K wrote

well, since javascript is the new assembler, no wonder people HAVE to use something more sane :)

legomushroom wrote

Great post! The question is - do we have to use preprocessors or libraries when we trying to explain and share our source code. The way people use Jquery in their posts and answers is pretty much the same. Abstractions and code length it gives to us is really valuable. And if jq is just common library, the syntax of cs will almost become the syntax of js in es6 shortly. I will definitely agree with you about SO - it is not very polite to answer with jq/cs on js questions. Thank you!

题叶 wrote
  1. Pasting compiled code is considered impolite, since there’s already a neat version of code, so I perfer pasting both versions when asking on StackOverflow, or if there’s someone pointing that project uses JavaScript than CoffeeScript, I would drop the CoffeeScript version.

  2. I learned CoffeeScript before JS, meanwhile I think CoffeeScript is so simple that JavaScript programmer knows it, especially who people know Ruby will find CoffeeScript dead simple. Your case is strange to me.

  3. CoffeeScript’s maintainer rejected a bunch of features to keep CoffeeScript same with JavaScript. So please don’t see CoffeeScript like TypeScript.

Brook Monroe wrote

If Ruby programmers find CoffeeScript to be dead simple, then CS isn’t the same as JavaScript, is it? I’m struggling to see the equation here.

notatestuser wrote

So there are a couple of things I’ve inferred from your post

  1. you don’t like coffeescript because some other people don’t know coffeescript
  2. you don’t like coffeescript because it compiles into code you don’t understand

I don’t see either of these being a problem with the language itself or its use in projects. Like jade, its use tends to increase productivity because you’re able to make use of features like list comprehensions

Talysson de Oliveira Cassiano wrote

Men, he just wants to say that CoffeeScript it NOT Javascript, so it’s not polite to answer a question about JS with CS as if they were the same, as if JS programmers always use CS in their projects. Just it, he’s not saying that he doesn’t like it because it’s hard (it’s not !).

I totally agree with the post !

And about the comparison jQuery-CoffeeScript: it’s not the same thing, jQuery uses JavaScript sintax, CofeeScript don’t, a JS programmer easily understands jQuery, the same is not true about CoffeeScript.

social wrote

Awesome article. Those are exactly my thoughts when i would stumble onto any variation of coffeelike snippets anywhere. The most unbearable is when you start spending time looking for something very specific only to find out there’s only a stupid unreadable snippet of coffeescript around.

notatestuser wrote
Nicolas Bevacqua wrote

@notatestuser that just goes to show how easy it is for CoffeeScript users to translate their code before posting a CS answer to a JS question

Tony Brown wrote

never was a fan of coffee-script, I think it’s not as readable as javascript and I hate the fact that it was being forced on you. this is a good read as well http://bit.ly/156CHrS

Frans Krojegård wrote

While I respect your right to not like CS, this post is off-putting and not constructive.

Just because you can’t read it doesn’t mean it isn’t legible.

I also respect the right to answer with CS on a JS question. I don’t think I’ve done it myself, but if I take time out of my day to answer one of your questions shouldn’t you be happy I made an effort at all? Downvote if you don’t like it. CS is mostly JS. Can’t really think of anything that’s CS specific enough to be illegible to a decently seasoned programmer. If a newbie receive that answer maybe that isn’t optimal of course.

Comparing JS and CS to Jade and HTML is a decent comparison. Yes, there are differences, but one is a programming language and one is a markup language, big fucking whoop that it’s not exactly the same thing.

joe.minichino wrote

Jython and Java both compile to bytecode. Next time I answer to a Java question I’ll write my answer in Python, what the hell.

The post is not an anti-CS crusade, it’s specifically about CS users being very confused about the legibility of their answer to JS coders.

And by the way, the amount of people that assume that JS coders have knowledge or familiarity with Ruby is amazing. All Ruby has done for JS is to bring in a bunch of kids thinking omitting semicolons is hip.

Iván Vega wrote

Man, I love CS and JS both, and I understand and agree with your point about answering a JS question using CS. However I think that point is kind of lost with the rant. Just my 2 cents.

Max Hodges wrote

After all, the first non-procedural language I came upon was Visual Basic

wtf, VB is a non-procedural language?

credibility alert

Neidhardt Buell wrote

VB is considered an Even Driven programming language unlike its direct predecessor QBasic which is procedural.

Max Hodges wrote

I think the author’s analogy between Visual Basic and CoffeeScript reflects gross ignorance of both Visual Basic and CoffeeScript.

…Visual Basic has the sameish “human-readable” syntax style that we find in CoffeeScript.

uh, not really. The opposite is true actually. Which is more human-readable:

if (opposite) {
number = -42;

number = -42 if opposite

I, too, relinquished code quality in favor of blindly telling my compiler On Error Resume Next, an obscure construct in VB where it acted as if every single line was wrapped in a try/catch block. Oh, the joy of blindly and naively debugging code back then.

Structured error handling using the Try block is a relatively recent innovation, appearing in the first versions of Visual Basic.NET. Visual Basic 6 and earlier versions used a more line-oriented syntax sometimes called Visual Basic Classic Error Handling. In fact you can still use both styles in the same program, although not in the same routine.

Any programming language feature can be an “obscure construct” if you don’t properly understand it. As far as debugging is concerned, Microsoft had been long ahead of others with their sophisticated IDE. I’m not sure what the author is comparing it to, but debugging VB with stack trace tools, watch window, and code stepping was and still is quite a joy indeed.

Michael Robinson wrote

I think you’ll find that a large proportion of the programming community find the former more readable.

Programming languages cannot be human languages, and the opinion of many is that they shouldn’t try.

Michael Theriot wrote

The former. This is the first time I’ve seen conditions placed after what should occur.

Timmy wrote

The Former.

CS feels like a baby language, “Cup want” while pointing to the cupboard.

Bruce Davidson wrote

Placing the condition after the expression is nothing new. About 20 years ago, on DEC RSTS/E the basic language B2S used the same construct. It was actually the point that made me interested in CoffeeScript in the first place.

Neidhardt Buell wrote

I would agree that the former is more readable. I think it has a lot to do what has become the defacto standard, which sets my expectation of how the language will express itself. I don’t expect to see a logical operator after an assignment without a visual clue that something is different with this language.