Cover image for Why I LOVE CoffeeScript!(and why you should use it)

Why I LOVE CoffeeScript!(and why you should use it)

seanolad profile image Sean ・2 min read

So Why CoffeeScript?

Have you ever wanted JavaScript to be easier. I know many different frameworks offer something, like Vue for better visuals, or React with virtual DOM(which I do recommend you check out), but, TBH, simplicity is always lacking. If we're being honest sometimes it's a real issue, and after a while you just get used to it. No more, because that's what CoffeeScript is for.

So what is Simple when it comes to programming with CoffeScript?

Most code newbies start with readable programming languages like, Python or Ruby. JavaScript is likely up there with the top ten, but even so, the gap in readability between Ruby and Vanilla JS is too big. So some genius put the best of both worlds together and got Coffescript. Now someone might say:

I like JavaScript just fine.

And that's fine, but once you see the drastic difference in readability I think it's fair to say you will want to use CoffeeScript for its readability.

Here's this example:


Vanilla JS:

Okay, but doesn't all the interpretation of the more readable code make running code on CoffeeScript slower?

No, luckily for us CoffeScript code is compiled to a JS file before it's interpreted using JIT.

CoffeeScript 2.5.1, the newest version, is supported in Node.js. CoffeeScript supports all ES6 additions. And for pre-Ruby developers CoffeeScript reads like Ruby with the addition of JavaScript concepts, and CoffeeScript is great for web development.

So why haven't I seen anything using CoffeScript? or at least heard about it?

CoffeeScript isn't as popular as languages like TypeScript, which many JavaScript programmers flock to. There are many factors that go into this, it's mostly preference and usage, but also how long it takes to learn. You see all JavaScript code is valid TypeScript code but not neccesarily vice versa. So in essence TypeScript is JavaScript but more advanced. Now, CoffeeScript doesn't actually bring that to the table. CoffeeScript syntax is different than JavaScript and requires a different view point to be best understood. For developers with a strong base in JavaScript looking to advance in their web development skills TypeScript is usually their first pick.

So, should I use TypeScript?

If you want sure, but code is meant to be readable for time efficiency purposes and TypeScript doesn't meet that goal, in fact it's even less readable than Vanilla JS in my opinion.

So... CoffeeScript huh?

Are you going to go get it or what?

Go get 'em

Posted on Jun 2 by:

seanolad profile



Hi, name's Sean. I'm a junior developer(still in high school though).


markdown guide