BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

CoffeeScript 2 Released, Adding Modern JavaScript Features

| by David Iffland Follow 3 Followers on Oct 03, 2017. Estimated reading time: 1 minute |

After a year of intense activity, CoffeeScript has risen from the embers with CoffeeScript 2, updating the language for use in a modern JavaScript community.

In a blog post announcing the release, Geoffrey Booth wrote that CoffeeScript 2 hopes to bring the language up to speed for modern uses:

This new release of the CoffeeScript language and compiler aims to bring CoffeeScript into the modern JavaScript era, closing gaps in compatibility with JavaScript while preserving the clean syntax that is CoffeeScript’s hallmark.

When CoffeeScript was first in use, ECMAScript 2015 hadn't been released and so the language didn't have class definitions and arrow functions (=>). The concepts were heavily used in CoffeeScript and allowed JavaScript developers the ability to think in terms that weren't yet available in JavaScript. But times have changed and those features now exist in plain JavaScript. Because CoffeeScript 2 generates modern JavaScript output, class and => output as is. Other features added to CoffeeScript include:

  • modules
  • async functions
  • default parameter values
  • object destructing

After a flurry of activity and community head space, CoffeeScript had languished. Hacker News user srb- wrote that, "as a CoffeeScript fan, things were looking pretty bleak a year or two ago. In particular there was zero momentum for new features."

Jeremy Ashkenas, the creator of CoffeeScript, says that "But for the folks who still do [use CoffeeScript] — or have existing codebases — this update is for you". While interest in the language faded over time, CoffeeScript did influence the modern JavaScript we have today. Brendan Eich, the creator of JavaScript, wrote that the ES6 fat arrow functions were "inspired in part by CoffeeScript".

In an interview with InfoQ, Booth says he's happy with the results:

I think CoffeeScript is in a good place. It’s not the phenomenon of a few years ago, but that’s a good thing: now it can focus on being the cleaner JavaScript, and ECMA can focus on language features. CoffeeScript is still popular enough and supported enough to be used for any project, and that was our goal with CoffeeScript 2.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT