Live data from Hacker News

Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

eng.datafox.com

11–20 of 47 posts

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#11

It's pretty wild having seen CoffeeScript spread like a wildfire in the early 2010s, only to be discarded nearly as fast a couple years later.

I'd say you could see this coming as soon as it emerged. People didn't want to learn yucky JavaScript syntax, then they learned it anyway because that's always how this happens, and now here we are.

Whole technologies have been invented simply so that devs can avoid learning or touching JS. Once upon a time, I was one of them.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#12

It's pretty wild having seen CoffeeScript spread like a wildfire in the early 2010s, only to be discarded nearly as fast a couple years later.

Same, the JS cool-kids swore up-and-down that CoffeeScript was the future and we'd be fools to not jump on.

It's another reminder that no-one knows the future.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#13
post #10

It's pretty wild having seen CoffeeScript spread like a wildfire in the early 2010s, only to be discarded nearly as fast a couple years later.

Yes, I had the feeling this had to do with the rise of Nodejs. Back in 2010 I was mostly a PHP dev and some Nodejs devs told me how cool and better it is and that there is CoffeeScript, which is also much better than JavaScript and PHP combined. I also started a JS project in 2015 were the lead dev started 3 months before me with... CS! But he rewrote most of it in ES2015.

Wait, why were node devs talking about Coffeescript? Weird.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#14
post #10

Earlier quoted context omitted.

Yes, I had the feeling this had to do with the rise of Nodejs. Back in 2010 I was mostly a PHP dev and some Nodejs devs told me how cool and better it is and that there is CoffeeScript, which is also much better than JavaScript and PHP combined. I also started a JS project in 2015 were the lead dev started 3 months before me with... CS! But he rewrote most of it in ES2015.

Wait, why were node devs talking about Coffeescript? Weird.

You can write CoffeeScript to target Node...

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#15

It's pretty wild having seen CoffeeScript spread like a wildfire in the early 2010s, only to be discarded nearly as fast a couple years later.

I can relate. I wrote an essay on this a while back:

https://www.nemil.com/musings/shinyandnew.html

Excerpt: Pity the modern web or mobile app developer on Hacker News. As a full stack startup developer in 2012, you were building websites using Ruby/Rails on the backend, Backbone/Coffeescript/Underscore on the frontend, while deploying your app with Capistrano (or the relevant Python analog). By 2013, you'd transitioned to Node/Express/Mongo on the backend, Grunt/Ember on the frontend. In 2014, you'd switched whole hog over to the MEAN stack (now with promises), but experimented with Koa and considered a shift to Go (after the Express core contributor made the jump).

In 2015, you're using Gulp/ES2015/React on the front end, Express/Go on the backend, React Native over the native mobile languages, and slowly transitioning your system over to microservices with Docker. Soon, you'll be transitioning to Phoenix, figuring out if Angular 2 is the right choice - and maybe even plotting a world where Go can work on Android and where an open sourced Swift might fit into your stack. (I’m clearly exaggerating for effect, though this is a fair representation of what is popular in HN headlines)

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#16
post #12

It's pretty wild having seen CoffeeScript spread like a wildfire in the early 2010s, only to be discarded nearly as fast a couple years later.

Same, the JS cool-kids swore up-and-down that CoffeeScript was the future and we'd be fools to not jump on. It's another reminder that no-one knows the future.

CoffeeScript always felt forced onto me during the height of 37Signal's influence of software development trends at the time. At the only rails shop I ever worked at it was heavily resisted.

It was at the same time I was reading more and more of Resig blogs and books (Secrets of the JavaScript ninja) and I really began to learn and grok just plain normal JavaScript. I said to myself, "you know, this really isn't that bad"

Haven't looked back since. I hate the direction ES is going.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#18
post #12

It's pretty wild having seen CoffeeScript spread like a wildfire in the early 2010s, only to be discarded nearly as fast a couple years later.

Same, the JS cool-kids swore up-and-down that CoffeeScript was the future and we'd be fools to not jump on. It's another reminder that no-one knows the future.

Mmm, from my view it was driven more by Rubyists who disliked that JS was much uglier than their chosen language. JS devs just write JS, because they know it already.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#19

Hopefully the fate of TypeScript will be the same. If one wants Java in the browser, one can just create Java applets.

I can't tell if you're joking; applets are being officially deprecated in Java 9 and browsers disable them by default now.

Re: Decaffeinating a Large CoffeeScript Codebase Without Losing Sleep

#20
post #4
post #3

Plain vanilla JS (and therefore TypeScript) still lacks one killer feature from the Coffee family: Null propagation operators (`a ? b` => `a != null ? a : b`, `a?.x` => `a == null ? null : a.x`, etc). Even C# has it.

I agree, it's one of the features we'll miss. There is a Stage 1 Null Propagation proposal: https://github.com/tc39/proposal-optional-chaining

There's a babel transform for this in case you want to start using it now, before browsers support it:

https://github.com/babel/babel/tree/7.0/packages/babel-plugi...

Post reply on HN