News for hackers. Stuff that matters.
Re:Node.js ES2015/ES6 support by mbrock on Monday April 25, 2016 @11:08AM (#11564670)
The code I write in ES2015 makes very heavy use of arrow functions, destructuring parameters, the ellipsis syntax for extending arrays and objects, and the syntax for evaluated object literal keys.

Random example:

    DRAFT_LOADED: ({
      state: { drafts },
      payload: { draft }
    }) => ({
      drafts: {
        ...drafts,
        [draft.id]: draft
      }
    })
In classic JavaScript, I'd have to write something like:

    RESULTS_LOADED: function(state, payload) {
      return {
        drafts: Object.assign(
          {}, state.drafts,
          keyValue(payload.draft.id, payload.draft)
        )
      }
    }
The new syntax rules combine to significantly improve the clarity of this kind of transformation function.
Re:Node.js ES2015/ES6 support by z3t4 on Monday April 25, 2016 @03:37PM (#11566740)
hmm. Looks like some sort of exploit. Tried to run it in node and got some weird error I haven't seen before. Did you just pwn me?
Re:Node.js ES2015/ES6 support by mbrock on Monday April 25, 2016 @04:34PM (#11567115)
haha, no... I haven't tried it in pure Node, I'm using Babel for transpiling.