CoffeeScript, a language that compiles into JavaScript, released its version 2.0 in beta with support of the latest ES2015+ features.
According to the CoffeeScript overview page, this language introduces many features into the JavaScript world, like => and destructuring and classes. The intent of the language, however, was not to be a superset of JavaScript, but instead, to provide a “cleaner, terser syntax that uses less punctuation and enforces indentation, to make code easier to read and reason about,” reads the overview page.
Some developers may ask, why use CoffeeScript when there’s ES2015+? According to the folks at CoffeeScript, the increased clarity of the language leads to an increase in quality, which results in fewer bugs. And, CoffeeScript 2 supports many of the latest ES2015+ features, output using ES2015+ syntax.
Developers that are looking for a tool that takes CoffeeScript input and generates JavaScript output running in any JavaScript runtime, should stick with the CoffeeScript 1.x branch. The reason is, “CoffeeScript 2 breaks compatibility with certain CoffeeScript 1.x features in order to conform with the ES2015+ specifications, and generate more idiomatic output (a CoffeeScript => becomes an ES =>; a CoffeeScript class becomes an ES class; and so on),” according to CoffeeScript.
Developers looking to get started with version 2.0 beta of CoffeeScript can download it here.