Live data from Hacker News

Replace CoffeeScript with ES6

robots.thoughtbot.com

121–130 of 178 posts

Re: Replace CoffeeScript with ES6

#121
post #92

The reason that I like CoffeeScript is that it removes, what I consider, the unnecessary boilerplate of JavaScript and replaces it with a shorthand equivalent and good conventions. I feel that CoffeeScript is better at representing the intent of JS than JS. I can visually sift through CoffeeScript and understand the code much quicker than normal JavaScript, which in my opinion leads to more maintainable code. I'm not…

Ex-Coffeescript ,now Javascript with lot's of Python experience guy here. The "I understand CS code much quicker" argument is a valid one theoretically, but In my opinion, it does not hold up practically that well. CS got one thing wrong that Python got right: There are many ways to do things. When writing CS, I understood MY CS just fine... but it always took me longer to understand the CS of other people. Sometimes…

> There are many ways to do things

Hopefully you realize that most Rubyists will strongly disagree and think that's not a "problem".

Re: Replace CoffeeScript with ES6

#122
post #104

The "all or nothing" with CS has always been a non starter for me. I find it really hard to believe that it is possible for a team of more than 2 or 3 to remain happy with a choice to use it after any extended period of time. If you're out there though, I would love to hear from you! And yes, this can be said for almost any tool choice, but my spidey sense tells me the half life for CS is about that of something like…

mobile.nytimes.com is written in CoffeeScript (frontend and backend) and is maintained by a team of around 8 people. AFAIK all of the developers are fine with it.

Re: Replace CoffeeScript with ES6

#123
post #74

Earlier quoted context omitted.

> you should never, ever be debugging a problem on live Until you have to

Then you've done it wrong. Very, very wrong. You should be able to replicate your live environment locally and not being able to is a sign of a very broken development process. I just cannot emphasise this enough. One of my skills is debugging, everywhere I've worked I've been one of the top debuggers if not the top debugger. Never, ever debug on live. If you can't recreate the problem locally, you don't understand t…

I think there's a lot true in what you've written. However the root cause fix applied in a development environment is not always the fastest way to stop a user facing problem. Things get weird on live servers. I'm not suggesting altering code willy-nilly but a solid knowledge of production (logging, service status, etc) can lead to more effective debugging scenarios and faster time to resolution when things do go bad.

Re: Replace CoffeeScript with ES6

#124
post #104

The "all or nothing" with CS has always been a non starter for me. I find it really hard to believe that it is possible for a team of more than 2 or 3 to remain happy with a choice to use it after any extended period of time. If you're out there though, I would love to hear from you! And yes, this can be said for almost any tool choice, but my spidey sense tells me the half life for CS is about that of something like…

I don't know what you consider an extended period of time, but I've been writing CoffeeScript full time for 2 years now, and it's been like that at my day job (moviepilot.com) for at least 2 more before I came. Couldn't be happier!

Team size varies between 8 to 15 people, roughly.

Re: Replace CoffeeScript with ES6

#125
post #45

Earlier quoted context omitted.

Care to list some? I'm always interested in seeing what's out there

The big one is probably LiveScript. I feel like it removes some of CoffeeScripts rough edges (the big one is the scoping rules; in LiveScript you have to use := to modify a variable in in outer scope).

Yes, but they slowed down...

The LS2 issues are from years ago and nothing is happening.

Re: Replace CoffeeScript with ES6

#126
Folks, this was always part of the plan ;)

CoffeeScript is a fun little experiment in what's possible when you take JavaScript semantics and try to boil down the user interface to a minimalist surface. But JavaScript will always keep on rolling onwards — and to the extent that future versions of JavaScript take any minor inspiration or reference or overlap with things that CoffeeScript already does, the more the better.

For example, see this talk from four (!) years ago: https://www.youtube.com/watch?v=QTj6Q_zV1yg

There's more than one way to skin the JavaScript cat.

In other news, CoffeeScript 1.9.0 came out yesterday — with support for ES6 generator functions. A-la Python, in CoffeeScript, a generator is simply a function that "yield"s.

Re: Replace CoffeeScript with ES6

#127
post #99

Earlier quoted context omitted.

Ditching all the useless lines of closing brackets and parenthesis is my favorite part of using coffeescript. Matching up brackets is a pain. The less I have to do that, the better.

My editors have had bracket/parenthesis matching for 30+ years, and automated indentation support as well. I don't get why anyone would do that manually.

Also if it works good, you can give them the same color as whitespace, which I always show, but with almost the same color as the background. This reduces the cognitive overhead a bit.

Re: Replace CoffeeScript with ES6

#128
post #50

The reason that I like CoffeeScript is that it removes, what I consider, the unnecessary boilerplate of JavaScript and replaces it with a shorthand equivalent and good conventions. I feel that CoffeeScript is better at representing the intent of JS than JS. I can visually sift through CoffeeScript and understand the code much quicker than normal JavaScript, which in my opinion leads to more maintainable code. I'm not…

My biggest problem is definitely the source maps. It took me forever to get them to "work" and while the stack traces are mostly correct, they're often off by a line number or two. This makes debugging ridiculously hard when the line numbers are just "close". I know this might not sound like a big deal in the grand scheme of things, but I also don't think CoffeeScript really improves on js all that much, so the annoy…

Have you tried them at all recently? If a source map is off by a line, that's a bug that should be reported and fixed pronto.

Re: Replace CoffeeScript with ES6

#129

Folks, this was always part of the plan ;) CoffeeScript is a fun little experiment in what's possible when you take JavaScript semantics and try to boil down the user interface to a minimalist surface. But JavaScript will always keep on rolling onwards — and to the extent that future versions of JavaScript take any minor inspiration or reference or overlap with things that CoffeeScript already does, the more the bett…

^ To those not in the know, the above poster 'jashkenas' is Jeremy Ashkenas, the creator of CoffeeScript and Backbone.js

Re: Replace CoffeeScript with ES6

#130
CoffeeScript syntax is better and cleaner than the ES6 syntax. It's a fun language, and I've been using it everyday since it came out. On small projects, it's top-notch.

But the future of CoffeeScript is bleak because many software designers are beginning to understand the value of type systems, e.g. TypeScript and Flow, for building maintainable Javascript code bases, and this means CoffeeScript is out of the picture for good because its long term design goal is to remain a minimalistic language, and doesn't intend to support these ideas. There have been attempts[0] to fork it to add a legitimate type system to it so it can scale, but they have faltered. Aside from that, the way CS deals with variable shadowing[1] makes it risky to use in large codebases.

So when ES6 syntax is tolerable and stable, I will pack my bags and move over to the ES6 land with great regret. I wish I could stay in CS land for longer, but you have to put away childish things eventually.

------------

[0] https://www.npmjs.com/package/typed-coffee-script

[1] http://stackoverflow.com/questions/15223430/why-is-coffeescr...

Post reply on HN