Paul Krill
Editor at Large

CoffeeScript upgrade refocuses on JavaScript standards

news
Apr 18, 20172 mins

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

espresso coffee java
Credit: Brian Legate

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 coffeescript.org’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 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 tally.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author