News for hackers. Stuff that matters.
Re:Node v6.9.0 (LTS) by CSDude on Tuesday October 18, 2016 @02:48PM (#12737466)
I wish the browsers moved on with the support as fast as Node so that we can get rid of stupid hundreds of MBs dependencies to transform a arrow function.
Re:Node v6.9.0 (LTS) by BinaryIdiot on Tuesday October 18, 2016 @03:45PM (#12737996)
So two things.

First, it doesn't matter how fast browsers moved. Currently they're moving pretty damn quick if you ask me but it doesn't matter because you need to know your audience and what browser(s) they use.

Second, I don't understand the want or need to include "hundreds of MBs dependencies to transform a arrow function". Why do you have to use an arrow function? Yeah it looks nicer but if you're complaining about how much dependency it brings in why not just not use it? Don't get me wrong I like ECMAScript 2015 but if you don't want to bring in the huge amount of transpiler dependencies ECMASCript 5 is still super easy to write.

Re:Node v6.9.0 (LTS) by algesten on Tuesday October 18, 2016 @04:51PM (#12738586)
Exactly my point. Arrow functions and destructuring assignments are great, but we've put up with function() { ... } for the last 20 years, so I'm pretty certain we can wait a couple of more years and not get bogged down in these crazy tooling chains to achieve so little.

and if we insist on crazy tooling chains, how about getting some real benefit – like coffeescript (?-operator anyone) or typescript (yes, typing can help, just look at swift)?

Re:Node v6.9.0 (LTS) by tracker1 on Tuesday October 18, 2016 @03:06PM (#12737650)
The engine that Node is using is already in chrome, and iirc all the major current versions of browsers already have 97% support (tail call opts withstanding, I think for safari this is still a vNext issue).

You can use one of a number of modern targets which will avoid the need for the various polyfils etc... but if you need current safari and any IE support, you will at least need dual build paths, which isn't too bad. I kind of wish there was a babel preset that was meant to be used in conjuction with Financial Times' polyfill.io

Re:Node v6.9.0 (LTS) by hzoo on Tuesday October 18, 2016 @03:09PM (#12737678)
I've been working on https://github.com/babel/babel-preset-env/ and there's a similar request although using babel-polyfill rather than the service https://github.com/babel/babel-preset-env/issues/20
Re:Node v6.9.0 (LTS) by minitech on Tuesday October 18, 2016 @02:51PM (#12737489)
Browsers already support arrow functions (and did before Node), but there’s no reason to break compatibility with old browsers just to get arrow functions.

If that’s the only thing you’re transforming, my advice would be to stop and just use function () {}.

Re:Node v6.9.0 (LTS) by TAForObvReasons on Tuesday October 18, 2016 @02:59PM (#12737576)
> we can get rid of stupid hundreds of MBs dependencies to transform a arrow function.

Depending on your target market, you may be stuck on ES5. Your users' browser behavior determines when you can remove the shims and transforms, and if they aren't upgrading you can't really force them to upgrade the browsers.

Re:Node v6.9.0 (LTS) by komali2 on Tuesday October 18, 2016 @06:33PM (#12739324)
>force them to upgrade their browsers

Please yes

Re:Node v6.9.0 (LTS) by qaq on Tuesday October 18, 2016 @03:06PM (#12737652)
Hmm Node is trailing chrome what exactly are you talking about?
Re:Node v6.9.0 (LTS) by tiglionabbit on Tuesday October 18, 2016 @04:28PM (#12738354)
They do. Try writing an arrow function into your browser's console right now.

http://caniuse.com/#feat=arrow-functions