Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

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.



sort by: page size:

CoffeeScript's syntax make a lot more sense than ES6, and CoffeeScript 2 compiles down to ES6 primitives. It's a shame that it's usage is pretty low in the industry.

If you miss the syntax, why not wait out for CoffeeScript 2? They're going to add all of the ES6 features, to my understanding.

I use CoffeeScript whenever requirements permit. Recently I've been working on a small side project using ES6 (via iojs) and I have to admit that it's pretty refreshing to see JavaScript take on some modern improvements and it's clear that today's CoffeeScript loses out on critical functionality that ES6 brings to the table.

With that stated, I still overwhelmingly prefer CoffeeScript's syntax to ES6. I'm glad ES6 took some inspiration from CoffeeScript, and Babel is a great way to bridge the future of JavaScript over to client's of the present, but I'll always prefer the CoffeeScript syntax for white-space sensitivity, support for optional semi-colons, optional parenthesis for function calls and optional curly braces for object literals. I don't need those features but I really like them. For me, the real future of JavaScript is a re-imagined CoffeeScript that takes on some refined semantics in order to bring ES6 feature support into the CoffeeScript compiler. Admittedly, that is not a simple undertaking (though I'd imagine the code would be simpler as a whole since it would necessarily trash obsolete features like pseudo-classes etc), but I know I'm not the only person who would love something like this.

I don't know how jashkenas is feeling about ES6, but one day I'll have my ES6Coffee, even if I have to brew it myself.


I used CoffeeScript for personal projects and absolutely loved the syntax.

Wasn't able to promote it at work though, because of the lack of support at that time (it felt kinda rusty, most 3rd party libraries were deprecated, and no jsx).

Glad to see things are changing, the new release looks great !


Why not both? This makes a good argument for ES6, but CoffeeScript's fundamental changes to syntax are just preferred by some.

While I understand the move to es6 or whatever we're calling it now, a part of me really misses coffeescript. I found it to be very elegant

Huge thanks to CS2 team! Great to see CoffeeScript alive again and targeting ES6, making lot of easier to to choose it for new projects.

I never abandoned CS or converted existing codebases to ES6, as I feel that ES6 hasn't much to offer compared to CS, and you lose the elegant syntax, which was always the major selling point for me (former Pythonista).

CoffeeScript is closer what Javascript was originally meant to be, before Brendan Eich had to adopt Java-like syntax, a decision made by Sun marketing team.


Despite being a huge CoffeeScript fan, having convinced our company to use it for the past 3+ years, and personally using it for ~5 years (https://github.com/jashkenas/coffeescript/issues/439), this article is missing one point.

Community.

Yes, there will be a CoffeeScript community that lingers on, but as things are looking now it won't be near as vibrant as it once was. Not only are there (seemingly) less people using CoffeeScript, but major related projects—such as CoffeeScriptRedux—are closing up shop (see this comment: https://github.com/michaelficarra/CoffeeScriptRedux/issues/3... ).

On the other hand, ES6 (and transpilers like Babel and Tracuer) are very popular right now. Some of that is hype & fad, but a lot of it is legitimate. In particular, I think that changes like the new module syntax are going to dramatically change Javascript development (even if we all transpile, speaking a unified module language is a huge improvement).

So, while I think it is totally reasonable to continue using CoffeeScript (and part of me really wants to!), it is hard to ignore/shun the community and momentum being ES6. For a while I was optimistically thinking that someone would eventually release CoffeeScript 2 (or even better, CoffeeScript6) that intentionally broke backwards compatibility to merge with ES6 semantics (classes, modules, etc). But now I'm thinking that is less and less likely (IMHO, CoffeeScriptRedux seemed like the best chance for that to happen).

I don't know if I'm ready to completely give up hope yet, but I think the article misses the point, community—and the (potential?) lack thereof—is one of, if not the most important thing to consider regarding your choice of language.


what a facile interpretation. CoffeeScript offered a large number of meaningful improvements over ES5, not including superficial syntax differences. It _still_ offers truly meaningful niceties that can make code _better_ than the JavaScript equivalent.

IMHO the CoffeeScript syntax is ugly and confusing.

ES6 improves the language without borking the syntax so much.

To add something more constructive, CoffeeScript is still just a transpiler. I think the long-term goal is for browsers to "natively" interpret/run ES6 code rather than forever transpiling to ES5. Either that, or we actually move on to something like web assembly.


That's interesting - personally I've always really disliked that about Coffeescript. It may just be because of how familair I am with C-family languages, but I always liked the default Javascript style far better.

So from my perspective ES6 is the best of both worlds - the better syntax of Javascript and the features that Coffeescript gave you.


I say again: Javascript can learn many things more from Coffeescript.

Coffeescript's future is diminished, presently (hah) - but ES6 only picked up a handful of magical features.


Since you were changing everything, I thought it would include a bunch of new revolutionary syntax and features, just like Coffeescript 1 did many years ago and made the world jump into ES6+.

Since this is just keeping up with the already existing ES6, why would anyone bother to move from ES6 to Coffee?


ES6 has killed much of CoffeeScript's momentum, because of parity on a lot of language features, but I still find those that don't work with JS everyday still prefer it due to cleaner syntax, and fewer surprises.

CoffeeScript is most similar to ES6 but with some slight differences in syntax and style

One reason (as I see it) is that TypeScript is implementing ES6 features along with the type-specifc stuff, so it's going to end up in a place where it's very compatible with the 'future' of JavaScript.

CoffeeScript will always be something quite different. I love it, but that difference makes me nervous. ES6 ought to bring a lot of the features I like about CoffeeScript into JavaScript.


CoffeeScript 2 will compile classes to ES6 classes, among other changes. So the output should be more readable than it was previously.

wow that’s cool to hear! I read about coffee 2 awhile ago and then heard nothing of it. I used to love coffeescript, arguably more than vanilla js, but forces that be led me to move on.

are you working with a team? if so was it easy to get buy-in?


I can't imagine CoffeeScript will see much adoption these days as most people seem to think ES6+ is "good enough". I miss how concise functions are in CoffeeScript and also miss being able to do object literals without the braces. But there's no chance at all in convincing my team to adopt it, as modern JS really is "good enough".
next

Legal | privacy