Sunday, December 4, 2011

CoffeeScript is the fresh air

When I started using Ruby and Rails in 2004 I immediately knew that Rails is going to be huge. At that time I was working mostly with Java.

Ruby and Rails brought so much joy to my programming world that it was kind of a revolution in my programming passion. This revolution is still going on, I'm still happy with Ruby and Rails even if I sometimes criticize some aspects of it.

There is however a new thing that triggered a new (r)evolution in my programming world.

This thing is called CoffeeScript.

I know that Coffee is only a "patch" to JavaScript, but for me this slight change is huge. The syntax is the prettiest combination of Ruby and Python that I have ever seen.

The code written in Coffee is so pretty that it almost allows you to think at new levels of abstraction. Yes, it's that huge to me.

I never especially liked working with JavaScript on the front-end. I preferred to focus on Ruby backends. Now it's harder to me to switch from frontend code to server Ruby code.

I still love Ruby, but CoffeeScript is officially becoming my new passion, equal to Ruby. If you haven't given it a try, then you should. It's so worth it.

3 comments:

Giles said...

Interesting! We've been doing a lot of JavaScript recently, and while there is a nice language hidden deep inside JS, it can be pretty tricky to find it. CoffeeScript sounds well worth a look.

Andrzej Krzywda said...

The nice thing with CoffeeScript is that you can introduce it gradually to your project. The result is still a valid JS that can integrate well with other JS code.

We've been also doing a lot of CS/JS recently at GameBoxed.com . There are still some older JS pieces, but all the new code is in CS.

I don't think we will ever come back to pure JS.

Anonymous said...

I love CoffeeScript, but I really hate all those unneeded return statements in the compiled JS :/