News for hackers. Stuff that matters.
Re:Converting a large React Codebase from Coffeescript to ES6 by kenOfYugen on Thursday February 23, 2017 @05:29PM (#13718466)
> The javascript language has advanced considerably. Not only has it adopted many of the syntax sugar features such as classes and fat arrow function, it has gone beyond coffeescript with features such as async/await and object spread properties.

Just like CoffeeScript's good parts got into JavaScript, JavaScript's new features are being merged into CoffeeScript. 'async/await' becomes just an elegant 'await' in CS and pure generators are just functions that yield, without special annotations (i.e function*()).

CoffeeScript is nearing its 2.0 release [1]. So the language is not "dead", and there is still room for "innovation" repeating the cycle anew.

1. https://github.com/coffeescript6/discuss/issues/71

Re:Converting a large React Codebase from Coffeescript to ES6 by jessaustin on Thursday February 23, 2017 @05:50PM (#13718621)
Since python has had generators that "are just functions that yield, without special annotations" like, forever, I was surprised when vanilla JS decided generators need more punctuation.
Re:Converting a large React Codebase from Coffeescript to ES6 by kenOfYugen on Thursday February 23, 2017 @05:58PM (#13718694)
They had to, since changes cannot break backwards compatibility with the legacy web.
Re:Converting a large React Codebase from Coffeescript to ES6 by jessaustin on Thursday February 23, 2017 @08:36PM (#13720026)
That seems plausible, but what would "yield" have meant before?
Re:Converting a large React Codebase from Coffeescript to ES6 by WorldMaker on Friday February 24, 2017 @11:07AM (#13724857)
It might have been a function or variable name. In finance and farming domains it's a somewhat likely function/variable name.
Re:Converting a large React Codebase from Coffeescript to ES6 by skilesare on Thursday February 23, 2017 @06:00PM (#13718715)
You just made my heart happy. I've been hoping for an updated and backwards compatible coffeescript update for a while. Glad to see it is coming along.
Re:Converting a large React Codebase from Coffeescript to ES6 by sjogress on Friday February 24, 2017 @12:37AM (#13721307)
Coffeescript 2 has some breaking changes, most notably classes since it is moving to ES6 classes instead of its own implementation.

I'm with you though, I much prefer Coffeescript syntax over Javascript so I'm really happy to see it coming along.

Re:Converting a large React Codebase from Coffeescript to ES6 by williamstein on Thursday February 23, 2017 @04:56PM (#13718191)
This is a very valuable article about what it would take to do such a migration. I also work on a large CoffeeScript + React codebase (https://github.com/sagemathinc/smc), write a lot of new CoffeeScript every day, and I have no plans to do a rewrite. I just don't see the value of doing a rewrite, given how hard it would be. I like CoffeeScript, find it expressive, and I think it would be easier to fix or maintain the relevant CoffeeScript tooling than to do a rewrite (just because a rewrite would be so damned difficult). Also, CoffeeScript really is sufficiently close to Javascript, and it interoperates effectively enough for now.

CoffeeScript is not totally dead. There's pretty regular activity this month (see https://github.com/jashkenas/coffeescript/commits/master). That said, personally, I find the stability of CoffeeScript to be kind of nice, considering how much churn there is in the rest of the Javascript world. The language barely changes at all, and that's kind of nice.

Re:Converting a large React Codebase from Coffeescript to ES6 by growtofill on Thursday February 23, 2017 @02:28PM (#13716907)
I believe articles like this should get more attention. There is a lot of hype about new technologies around JavaScript, but also there are many successful brownfield projects still actively developed. They may benefit from the new technologies, but rewrite is rarely a good idea, and there are not much info on migration process (speaking from personal experience).
Re:Converting a large React Codebase from Coffeescript to ES6 by kevinsd on Thursday February 23, 2017 @05:16PM (#13718342)
"According to The State of Javascript survey, only 6% of responders that have used coffeescript before said that they would consider using it again."

Nit: the calculation seems wrong to me.

- Used it before, would use again: 6%

- Used it before, would not use again: 25%

- Therefore, "responders that have used coffeescript before said that they would consider using it again" shall be: 6% / (6% + 25%) = 19.4%

Re:Converting a large React Codebase from Coffeescript to ES6 by jessaustin on Thursday February 23, 2017 @05:52PM (#13718641)
That chart was kind of weird itself, though. Can we really believe that more people have heard of CoffeeScript than "Plain JavaScript"?
Re:Converting a large React Codebase from Coffeescript to ES6 by JofArnold on Friday February 24, 2017 @06:06AM (#13722620)
We did exactly the same a year or two ago with my last startup. Just did it component by component with a general rule along the lines of "if you have to edit it, convert it to JS". The project was moving so fast that components would often become obsolete within a year anyway. Plus they were all very small so converting manually was trivial.
Re:Converting a large React Codebase from Coffeescript to ES6 by solidr53 on Thursday February 23, 2017 @05:28PM (#13718444)
Re:Converting a large React Codebase from Coffeescript to ES6 by maktouch on Saturday February 25, 2017 @09:26AM (#13731702)
That's deprecated :(
Re:Converting a large React Codebase from Coffeescript to ES6 by kvz on Thursday February 23, 2017 @05:29PM (#13718457)
Related: invig.io