Live data from Hacker News

Poll: Have you moved from JavaScript to CoffeeScript?

news.ycombinator.com

11–20 of 178 posts

Re: Poll: Have you moved from JavaScript to CoffeeScript?

#11
This is going to be a very interesting poll result. Even 5 or 10% penetration is something remarkable, for a language as widely-used as JavaScript.

If you feel like providing any more color beyond your vote, your impressions after using CoffeeScript in anger -- I'd love to hear 'em.

Re: Poll: Have you moved from JavaScript to CoffeeScript?

#14
I've added CoffeeScript support to the client-side of Appleseed, and I couldn't be happier. Building out the client-side framework used to be drudge work with Javascript, now I prefer it to server-side work (which is in PHP).

It's amazing what a more concise and logical syntax can do. While I think the language isn't perfect, it does just enough clean up on Javascript to make a huge difference.

Re: Poll: Have you moved from JavaScript to CoffeeScript?

#15
I use it for both client- and server-side. Do not skip learning JavaScript before learning CoffeeScript, if only to be able to debug CoffeeScript. The JavaScript equivalent of a 1-line CoffeeScript function can be over 20 lines, not because CoffeeScript compiles into bloated JavaScript, but because it is very 'expressive'.

A trivial example (ignore style), project euler problem 1:

  (x for x in [0..999] when x % 3 is 0 or x % 5 is 0).reduce (xs, x) -> xs + x

Re: Poll: Have you moved from JavaScript to CoffeeScript?

#16

This is going to be a very interesting poll result. Even 5 or 10% penetration is something remarkable, for a language as widely-used as JavaScript. If you feel like providing any more color beyond your vote, your impressions after using CoffeeScript in anger -- I'd love to hear 'em.

This is a lame reason not to have tried it yet, but I need to first skim a short tutorial that shows how to integrate with jQuery and ideally also shows simple uses of Backbone and Underscore in coffeescript.

BTW I love Backbone and Underscore and thanks to them (and also node) JS is actually more fun than ever.

Re: Poll: Have you moved from JavaScript to CoffeeScript?

#17

I have nothing against CoffeeScript, and I've used it on a few things, but in general I find JS to be an enjoyable language to work in. If I had more issues with the syntax or something, I might find the switch to CoffeeScript worthwhile.

Agree. CoffeeScript has great syntax that I find very inspiring and might incorporate into my own language someday, but all in all, javascript is not that bad... at least not the parts that CoffeeScript can fix.

Re: Poll: Have you moved from JavaScript to CoffeeScript?

#18
Initially, coming from a Python background, I looked at Coffeescript as a fix for all of JS's woes. In particular, I mistakenly though the fat arrow syntax would mean I never have to do any 'that = this' hacks again.

In practice, though, I frequently need/want to call a method as a callback. And inside that function, I might want to get something from whatever initiated the callback, and save it to the object I'm a method of. Ie, I want to access both forms of 'this'. So I still need to do the ;that = this' hack, ugly as it may be.

It would be super awesome if there was something that always referred to the topmost class object, and something else that always referred to the initiating object if one exists.

That said, I still like Coffeescript, was surprised to see how much Brenden Eich likes and supports the project at JSConf, and wouldn't be surprised if they addressed niggles like this in future.

Re: Poll: Have you moved from JavaScript to CoffeeScript?

#19

This is going to be a very interesting poll result. Even 5 or 10% penetration is something remarkable, for a language as widely-used as JavaScript. If you feel like providing any more color beyond your vote, your impressions after using CoffeeScript in anger -- I'd love to hear 'em.

Used it. Not extensively, but I have. It adds nothing of real value for me; I have no fundamental beef with the Good Parts of JavaScript and get nothing from a Ruby-inspired hat on top.

I'd like to see something like MileScript gain some traction--not to replace JavaScript, but as another tool in the toolbox. MileScript adds new value that you don't really get with plain JS; CoffeeScript doesn't.

Post reply on HN