CoffeeScript upgrade refocuses on JavaScript standards

Datetime:2017-04-19 05:18:53         Topic: JavaScript  CoffeeScript          Share        Original >>
Here to See The Original Article!!!

CoffeeScript, which attempts to make it easier to program in JavaScript, has a newly 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’s bulletin .

“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 laud the inclusion of 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 with support for 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 extra. Two of the other better-known entrants in this market include Microsoft’s TypeScript andGoogle 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 tally.