Why coffeescript?


I too am utterly baffled by the devs’ decision to use Coffeescript to write Atom. They have certainly walled off a lot of potential volunteers or contributors, myself included. I’ve worked with it on projects previously and can’t stand it. Unfortunately I guess the project is way too far along to do anything about it.


You may be unhappy about their choice but they did have a reason, This was discussed earlier in this thread,

Github is a Ruby shop. Atom obviously had to run on JS. CS is highly influenced by Ruby and is a thin layer over JS.


The thing I like about the devs’ decision to use CoffeeScript is that now I have an excuse to learn CoffeeScript. Usually when I learn something new, I need an actual task (in this case plugin writing) that I need to do using that language in order to really jumpstart the learning process.


Now that I know Coffeescript I see it as a syntax shorthand, but if you don’t know it then it IS a barrier. That’s the truth.

Yes, I find it fun now - if occasionally,
   I have to do some weird,
   annoying things,
   with spacing.

but let’s not forget how it looks to people who don’t know it.


Just to add a data point: I’m not really excited about CoffeeScript, but it’s not holding me back from Atom. Different software is implemented in different language, that’s just the way things are. As long as it’s not Intercal we should be alright.


I’ve never understand the haters of CS in the Node forums and Hacker News and I don’t understand it here either. As several have pointed out ST plugins are written in Python and it doesn’t get any hate.

The only thing I can think is that they don’t think it should exist if it just transpiles to JS. They don’t think it brings anything to the table and is just one more thing to learn.

IMHO they are quite wrong. Apparently many others agree judging from its success.


I agree - I have strong javascript skills and this is my first experience dabbling with CS. It has been a positive experience overall. I can definitely see myself using it in future projects.

The one part I am still having trouble getting my head around is debugging - usually shove a breakpoint in dev tools, then go back to my IDE to that line - obviously doesn’t map 1:1 with CS.


In my previous life as a web developer I routinely used source-mapping and everything worked perfectly. The debugger treated CS as well as JS. I tried once with Atom a while ago and it I had trouble. I was in a rush so I didn’t really give it a full go. I have been meaning to check it out again.


it’s true that the majority of ruby people use coffeescript because it makes js more ruby like. maybe you are an exception but CoffeeScript was pretty much invented and sustained by Ruby devs.

Just read the first line of the Wikipedia article on it:

CoffeeScript is a programming language that transcompiles to JavaScript. It adds syntactic sugar inspired by Ruby…


Well, one ruby dev. Jeremy Ashkenas is the sole creator of CS. He is also the author of backbone and underscore.


I was very excited about this project when I first started reading about it. Then I found out its written in CoffeeScript, which made me lose almost all interest, especially when Adobe Brackets is a formidable competitor and its written in JavaScript. I have no desire to learn another programming language that does the exact same thing as a language I already know when its only benefit is a prettier (and unfamiliar) syntax.


If you go to coffeescript.org you can see a plethora of features.


Just looked over coffeescript again, and still don’t get the coffescript vs javascript talks. Javascript is an automatic trump since coffeescript compiles to it. Doesn’t mean it doesn’t have a use, although one should be careful not to lose their grasp on VanillaJS.

P.S. I still get a kick out of http://vanilla-js.com/


ok so we are the developers. learning syntax of a an unknown programming language is easy for us. coffeescript has one of the most intuitive, easiest syntaxes i’ve seen so far. and yes, i am using rails and javascript daily in my job, so i basically had nothing to learn and that was one of the smoothiest transitions i’ve ever had.

never looked back to plain javascript after learning about coffeescript. however, important point is i sometimes still have legacy code that is written in javascript and i have no problem modifying it, writing it, so it seems learning CS did nothing to my JS skills. so that’s why i only see pros in CS.

for me “do coffee.drink if me.tired?” is a lot more readable than “if (me.tired) { coffee.drink(); }” :smile:


Braces never drop on you, but I’ve dropped plenty of braces in my day.


That site is hilarious!


Just chipping in to say that I also very happy with the Atom’s team decision to use Coffee-Script

These days I don’t code in JS anymore (the productivity and readability of Coffee-Script is much higher than JS)


I just want to pass to say that I feel that CS was the right tool for this project for several reasons, but without going any far I’m willing to write a plugin just because I can do it with CS without any hassle.

CS is prettier, easier to read and simpler to manage. If you have problems with the spacing is because you didn’t get used to it. Once you start getting it right the code literally flows. And god damn, the code it’s so beautiful that makes me cry :sob:

And I haven’t felt like that since I tried Scala a few years ago.

Extra Points: JS is a mess of nested functions and curly braces. While CS is really easy to make it look good.


Every new language I see that uses C syntax makes me cry, but not for happiness. I think everyone chooses it because that is what they are used to.


I can’t find these two sentences now, although the code examples in the style guide are still written in CoffeeScript.

.cson files are no longer eval-ed but are now parsed “safely” using cson-safe.