paint-brush
Coffee… what? How Developers Quit To Use CoffeeScriptby@SevenNationS
2,717 reads
2,717 reads

Coffee… what? How Developers Quit To Use CoffeeScript

by Stanley ZJanuary 27th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

In 2009 Jeremy Ashkenas created CoffeeScript, a programming language that compiles into JavaScript, called CoffeeScript. It was the first to present the concept of creating a function without a superfluous keyword function, replacing it with something that in 2015 was to become the function arrow (=> in ES6, -> in CoffeeScript). He also got rid of the curly braces (like Python), replacing them with indentations. In 2011, CoffeeScript was one of the most followed projects on GitHub and enjoyed relatively high popularity in the Ruby developers community.
featured image - Coffee… what? How Developers Quit To Use CoffeeScript
Stanley Z HackerNoon profile picture

It’s been over 10 years since the release of CoffeeScript and after a
decade, it seems we can state that this innovative idea became
completely forgotten by the front-end developers community.

In 2015, with the advent of ES6, occurred one of the largest revolutions in the world of JavaScript. Presenting a lot of new functionalities, and therefore possibilities, i.e. arrow functions, classes and inheritance, defining variables using let and much more. However, were they really such new solutions for a language like JS?

Well, in 2009 Jeremy Ashkenas (since 2011 — journalist of The New York Times) come out with a rather interesting idea to embellish and increase the readability of, quite in some cases complicated JavaScript code. Drawing inspiration from Python and Ruby, Ashkenas created a programming language that compiles into JavaScript, called CoffeeScript.

It was the first to present the concept of creating a function without a superfluous keyword function, replacing it with something that in 2015 was to become the function arrow (=> in ES6, -> in CoffeeScript). He also got rid of the curly braces (like Python), replacing them with indentations. Often in CoffeeScript, you can omit (once required) parentheses, that often unnecessarily decrement the readability of the code.

(JavaScript with jQuery)

$(document).ready(function(){
    // initialization code 
});

(CoffeeScript)

$ ->
    # initialization code

At the beginning, as with most new “improvements” to iconic languages ​​such as JavaScript, quite a lot of people approached CoffeeScript with great optimism (saying that it will replace JavaScript), or with extreme pessimism (saying that in a moment also CoffeeScript will be replaced by something even better, or that syntax improvements are unnecessary and senseless).

However, despite the large wave of criticism in 2011, CoffeeScript was one of the most followed projects on GitHub. At that time it enjoyed relatively high popularity in the Ruby developers community. A large part of CS supporters said that their code runs faster and it’s three times shorter than JS code.

Even the JavaScript founder himself — Brendan Eich said over time that CoffeeScript had a significant impact on his thoughts about the future of JavaScript.

(Example of comparing code length (CoffeeScript on the left, Vanilla JS on the right) ~ https://cofeescript.org#introduction)

There were many indications that CoffeeScript would be with us for a long time, but a lot changed to its disadvantage in 2015 after the introduction of JavaScript’s ES6. Which actually was an implementation of CS solutions into the language, from which the story began. In ES6, JavaScript has also added many interesting new features, that the CoffeeScript team’s engineers didn’t think about.

The Test Of Time

JavaScript has been evolving ever since, introducing and improving many aspects of the language. Then people from programming communities (mainly front-end) realized that CoffeeScript (despite the attempt to popularize the project again — the introduction of CoffeeScript 2 in 2017) is out of date and is starting to lag behind the ever-evolving Javascript environment.

As of today - January 2020, CoffeeScript is completely dead on the market (though the GitHub repository is still kinda alive). Knowledge of this language is not a sought after skill for a programmer, but a rather exotic (often unnecessary) add-on and platforms such as LinkedIn are no longer even adapted to add skills connected with this language.

In summary, CoffeeScript began as a fantastic idea (making it easier to write JavaScript code) ultimately, however, it did not stand the test of time and was pushed out by JavaScript and currently, hardly anyone remembers about it. Most new people in the front-end environment do not even know that such a language existed. Currently, instead of being included in lists of the most popular new programming languages, it takes top spots on the lists of the worst languages ​​to learn.

And finally, despite all these kind words, I have to admit that I also gave up CoffeeScript and switched to JS with React…

You can learn more about CoffeeScript on their official website.

If you want to share your opinion about this article, feel free to leave it in a comment below!

Many thanks for spending time reading the article,

SZ

External links and sources:

Previously published at https://medium.com/@staszekzaczek/how-coffeescript-got-forgotten-812328225987