Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Rails Duck
Rails Duck
8,545 Points

Ruby vs Coffeescript

What are the differences and similarities between Ruby and Coffeescript? What is an example of a complicated program written in Ruby compared to Coffeescript? Should I use Ruby or Coffeescript in my next project? If Coffeescript is the answer, is Coffeescript usable with Node.js, Express.js, Polymer.js, React.js, and other stuff? If Ruby is the answer, should I use Rails?

Thanks!!!

1 Answer

Kevin Korte
Kevin Korte
28,148 Points

There are no similarities between Ruby and Coffeescript. Coffeescript is a language that compiles into pure javascript. Coffescript is a little more elegent and shorter to write, and once ran through the coffeescript compiler, it will output as vanilla javascript, and that is the javascript your browser uses.

Coffeescript is (kinda) to javascript as Sass is to Css.

Ruby of course, is just Ruby.

You could also use coffeescript to write node.js code, as again, it just simply compiles down to the javascript.