CoffeeScript 2 available now

New major version of JavaScript transcompiler programming language released
19 September 2017   1758

Great news for CoffeeScript fans! New major version is finally available. 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.

New major features:

  • The CoffeeScript 2 compiler now translates CoffeeScript code into modern JavaScript syntax. So a CoffeeScript => is now output as =>, a CoffeeScript class is now output using the class keyword, and so on. This means you may need to transpile the CoffeeScript compiler’s output.
  • CoffeeScript 2 adds support for async functions syntax, for the future object destructuring syntax, and for JSX. Some features, such as modules (import and export statements), for…of, and tagged template literals were backported into CoffeeScript versions 1.11 and 1.12.
  • All of the above was achieved with very few breaking changes from 1.x. Most current CoffeeScript projects should be able to upgrade with little or no refactoring necessary.

CoffeeScript 2 was developed with two primary goals: remove any incompatibilities with modern JavaScript that might prevent CoffeeScript from being used on a project; and preserve as much backward compatibility as possible.

The following CoffeeScript features were updated in 2.0 to output using modern JavaScript syntax:

  • Modules: import/export
  • Classes: class Animal
  • Async functions: await someFunction()
  • Bound/arrow functions: =>
  • Function default parameters: (options = {}) ->
  • Function splat/rest parameters: (items...) ->
  • Destructuring, for both arrays and objects: [first, second] = items{length} = items
  • Object rest/spread properties: {options..., force: yes}{force, otherOptions...} = options
  • Interpolated strings/template literals (JS backticked strings): "Hello, #{user}!"
  • Tagged template literals: html"<strong>coffee</strong>"
  • JavaScript’s for…of is now available as CoffeeScript’s for…from (we already had a for…of): for n from generatorFunction()

There seem to be two breaking changes that affect a significant number of projects:

  • In CoffeeScript 2, “bare” super (calling super without arguments) is now no longer allowed, and one must use super() or super arguments... instead.
  • References to this/@ cannot occur before a call to super, per the JS spec.

CoffeeScript 2 has added support for the following:

  • JSX
  • Line comments are now output (in CoffeeScript 1 they were discarded)
  • Block comments are now allowed anywhere, enabling static type annotations using Flow’s comment-based syntax

Learn more at official website.  

Chrome 73 Released

Now the Android version of popular browser has Lite page mode that speeds up website download and reduces traffic consumption
13 March 2019   228

Google has released another update Chrome.

  • The Android application has Lite pages mode for optimizing pages, speeding up their loading and reducing traffic, as well as a new download manager.
  • Settings for account management and synchronization are collected in a separate section - Sync and Google services.
  • Improved video mode “picture in picture”. A floating window can now make web applications (PWA): chat rooms, instant messengers, video conferencing. And added the button "Skip advertising".
  • It is forbidden to load external resources in scripts provided by extensions. Extension developers now need to use background handlers.

The previous version was released in late January.