Dishing it out

io.js 2.0 forks out new ES6 features

Fork image via Shutterstock

A new drop from io.js brings in the upcoming version of JavaScript (ES6), with io.js 2.0 delivering a bevy of bug fixes and features no longer behind a staging feature flag.

Released a few days ago, version 2.0.0 of io.js upgrades its V8 JavaScript engine to, with an update of io.js 2.0.1 slated to hit V8 version The “friendly fork” of Node.js now ships with JavaScript ECMA-262 specification.

The new JavaScript class syntax is out of staging and now available behind the --use_strict flag. In addition to better inspection of the Promise, Map and Set objects (which is a huge help when developing and debugging), the REPL now has the ability to store command history across different sessions (Read-Eval-Print Loop). After setting a path in the appropriate environment, all entered commands are stored as a series of strings that can be navigated using the arrow keys the next time you open the REPL.

SEE ALSO: Node.js to be governed by foundation of IBM, PayPal, Microsoft and Linux

Other new features concern minor changes to the C++ API (although not a breaking change), with the “smalloc” module being marked as outdated. Developers are taking their own precautions in terms of the forthcoming version of V8 4.4 no longer being able to function without the tweak.

Rest parameters, another ES6 feature were added to staging behind the --harmony-rest-parameters flag. Rest parameters allow function signatures to declare an indefinite number of arguments as an array, with Carlos Souza showing us in the following example:

function listNames(...names){
  for(var name of names){

listNames("Annie", "Camille", "Julie");

Running this in the latest version of io.js now looks like this:

$ node --harmony-rest-parameters parameters.js

The complete changelog can be access on GitHub here in the coming days.

Still talking about the split

As most developers know, io.js forked from Node.js in 2014, so it seems that both will be forever plagued with mentions in one another’s updates (until a merge of the two begins to look possible). Mikeal Rogers recently posted online about this very topic, summing up his feelings about what needs to be done:

So, we need a foundation. One has been setup and wants us to join. It has, in my opinion, an ideal structure for io.js. As an added bonus we get to end the split and confusion in the community who are still torn between io.js and node.js. We get all of this and we get to keep our governance, release process, and working groups intact. If we choose to.

What Rogers is referring to here is the Node.js Foundation, with the issue of joining being listed on GitHub for feedback and community input. The vast majority of feedback is positive and for the move, with the policies of the foundation “designed to preserve the progress we’ve made in io.js”.

SEE ALSO: Node.js Foundation is taking shape

However, not all developers are for it, with Blake VandeMerwe saying: “It took all of a few months to branch out, do something great, then re-merge with the same people that made it bad in the first place. My involvement only goes as far as reading changelists and running the installer, but it seems like kind of a cop-out”.

Get involved in the Foundation conversation here.

Inline Feedbacks
View all comments