Menu
CoffeeScript upgrade refocuses on JavaScript standards

CoffeeScript upgrade refocuses on JavaScript standards

But the new beta breaks compatibility with some version 1 features in providing ECMAScript 2015+ support

CoffeeScript, which attempts to make it easier to program in JavaScript, has a just-released beta version that features ECMAScript 2015+ support.

The currently downloadable 2.0 beta offers ES2015+ syntax, where ES2015+ is recognized as ECMAScript 2015 and later features. ECMAScript is the official specification underlying JavaScript. The upgrade breaks compatibility with certain CoffeeScript 1 features to conform with ES2015+, according to coffeescript.org’s bulletin about the upgrade.

“Since the CoffeeScript 2 compiler outputs ES2015+ syntax, it is your responsibility to either ensure that your target JavaScript runtime(s) support all these features, or that you pass the output through another transpiler like Babel, Rollup, or Traceur Compiler,” the bulletin says.

CoffeeScript 2’s output is supported by the Node.js 7.6 server-side JavaScript platform, excepting modules requiring transpilation.

The builders of CoffeeScript are lauding the inclusion of CoffeeScript features such as destructuring and classes in ECMAScript. “We are happy that ECMA has seen their utility and adopted them into ECMAScript,” they said.

CoffeeScript compiles its "class" and "extends" keywords to ES2015 classes. In addition, ES2015 modules are supported. However, there are also features—such as let and const, for declaring variables within a block scope—that CoffeeScript intentionally does not support for simplicity’s sake.

CoffeeScript is a language that compiles to JavaScript, supporting existing JavaScript libraries. The compiler is intended to generate output JavaScript to run in every JavaScript runtime. It is among a group of languages that compile to JavaScript while looking to give developers a little something extra. Two of the other better-known entrants in this market include Microsoft’s TypeScript and Google Dart.

CoffeeScript has previously cracked the top 100 of the monthly Tiobe Index of language popularity, although it did not make it onto that list in this month’s index.


Follow Us

Join the newsletter!

Error: Please check your email address.
Show Comments