Live data from Hacker News

Poll: Have you moved from JavaScript to CoffeeScript?

news.ycombinator.com

31–40 of 178 posts

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

#32
post #25

Earlier quoted context omitted.

Do you have an example of a real-world piece of code that wants to access both the lexical and dynamic "this" ... and isn't a jQuery callback?

What's wrong with jQuery callbacks? ;)

jQuery generally abuses (or takes advantage of, depending on your perspective) the value of "this" in its callback functions, in places where it would really be better to have an explicit argument. For example:

    AccountView.prototype.render = function() {
      $(".account").click(function(e) {
        // `this` is now the same as `e.currentTarget`
        // But `e.target` is also useful.
        // And you what you really want is for `this`
        // to still point at the AccountView instance.
      });
    };

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

#33
I've recently begun porting a small canvas game that I'd been working on into Coffeescript. It definitely helped me create cleaner code. Also using it on a real project and I was able to prototype the basic functionality a lot more quickly than when I was using pure JS.

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

#34

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.

Maybe this sounds nitpicky but I'm just not a fan of languages that use indentation to denote block structure. It turns trivial code manipulations into tedious line-by-line exercises. I don't like it in Python or Haskell either.

Other than that I see a lot to like in CS though.

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

#36

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.

Unfortunately, this poll isn't scientific and you won't be able to trust the results no matter what it says. I expect the poll will show much higher CoffeeScript penetration than it has in reality.

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

#37

I just did my first tiny project in coffeescript and found it to be an odd experience. I was far too aware that I was programming in tokens that needed to map to JavaScript. Far too often I had to go back to the interactive "Try CoffeeScript" form on the website to peck things into until the parser errors went away. To those more experienced: at some point does thinking in pure coffeescript take over, and the JavaScr…

Why not use the REPL for pecking things ? The need to do that for syntax issues has almost disappeared for me over the first few weeks of use, but I consider the REPL to be a valuable tool even after I am quite accustomed to any language.

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

#38
One of the interesting things on doing some analytics on our customer base was seeing just how wide the gap is between the usual HN fare and reality:

http://blog.directededge.com/2010/05/30/what-programming-lan...

The core message being: things like Scala, Erlang, et al still represent a tiny portion of the actual tech world. (And our customers tend to be biased towards being techy anyway.) Just because CoffeeScript gets a lot of mentions in the ultra-early-adopter demographic doesn't mean that it's measurably popular yet.

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

#39

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.

I'd roughly estimate that 5% to 10% penetration on HN means 1/10% in the larger population.

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

#40
post #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.

I'd be shocked if Milescript got traction without it being inflicted on developers from above.

Milescript turns Javascrpit into Java. Whilst many developers don't have a problem with static typing, none I know of like the verbosity of Java.

An ML or Haskell styled Javascript might fare better.

Post reply on HN