Hacker News new | past | comments | ask | show | jobs | submit login

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've never done front end before (I just hate the JS syntax, so I've avoided it, besides a few jsonp requests) but with CoffeeScript I was persuaded to give it a try.

Here is my problem. Nothing is Google-able. Even basic things that I get caught up on the answer on IRC is usually "look up how to do it in JS, and then reform it to CS". Maybe I'm starting on the wrong stuff, but even though the syntax is wonderful, actually using libraries is a pain. I'm only on my 2nd day though, so maybe this is just the normal language growing pains.



Interesting. I'd gone through the first link before, but the second is quite good. Still doesn't change the fact that most libs you are using are written in JS (not to mention a whole new platform, the browser) and therefore harder to Google for, but thanks for your help.


2 days? Give it 2 weeks and you won't look back. I do think it's more suitable to writing a "new big app from scratch" -- fixing up some consulting client's website with some new JS widget and 5-20 lines of integration scripting or some such isn't the use-case where CoffeeScript gives you a notable advantage.


> "actually using libraries is a pain"

Maybe that is your source of confusion.. when you write CS code, you can use any existing JS library. The syntax is just different for what you write.


You should really learn Javascript first. Coffeescript is not (yet) a replacement for it, more like a tool.


I am strictly a server side programmer and have a problem doing front end work. I want to learn it, but it feels like a sheer cliff to me. The low level CoffeeScript documentation is excellent. What I am looking for and not being a JavaScript programmer this is admittedly difficult for me, is some hand holding on the mechanics.

* packaging, how do I import modules or packages? Do these even exist?

* debugging, how do I do this?

* unit testing?

I installed CoffeeScript via node, then npm (node package manager) and am using it via the command line.

Something like the ipython (http://ipython.scipy.org/moin/) shell along with pdb (http://muffinresearch.co.uk/archives/2008/04/27/python-debug...) would help immensely in my adoption of CoffeeScript.

In a perfect world the repl/debugger would be built into the webapp and open a websocket to another webapp so I could introspect/debug the page from another page while it was running (turtles all the way down). This is similar to the workflow for developing server side software (Jython, Python, Java).


For debugging, see node-inspector: https://github.com/dannycoates/node-inspector

For details about modules: http://nodejs.org/docs/v0.4.8/api/modules.html

Use the same site for the rest of the API too of course.

I like vows.js for unit testing: http://vowsjs.org/


* npm + bowserify or stich or others

* in firebug / web inspector

* qunit, jasmine etc

repl for node

    ### REPL ###
    repl = require 'repl'
    r = repl.start 'REPL> '
    r.context.client = -> exec("open http://localhost:#    {config.port}/") ; return


Thank you both for these links, I am off to a very good start.


I have pretty much moved to using CoffeeScript exclusively over JavaScript. One of the minor complaints I have (overall, it is magnificent) is that the looseness of the syntax sometimes leads me to doing a kind of guess-and-check style of programming where I write something, then try to compile it to see if it did what I expected. An example of this is when calling a function, you need a comment to continue the function arguments onto the next line, unless the argument on the next line is an object literal.

The only real problem is that debugging with CoffeeScript adds an extra layer of complexity. I know that this is more or less inevitable, but it is really the only major pain point that I encounter on a day-to-day basis.


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.


I'm not sure I agree--it's certainly verbose, but to me it feels more like C# verbosity (which I find helpful and often nice) than Java (which is often obfuscatory).


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.


You won't be needing underscore.js in coffeescript. Most of the underscore.js provides sequence abstractions and coffeescript does them out of the box. Things which aren't provided by coffeescript(and there aren't many) can be easily done in coffeescript directly.


I'm actually about to make a dip into using Backbone so I've been holding off on transitioning to CoffeeScript to limit my shock.

I've played around with the editor at GitHub though and I really like how CoffeeScript reads. That being said, actually using it in the wild seems is road I'm not quite ready to cross yet.


I've started using Backbone.js in a very limited way for some of our existing apps.

What I'm doing is just using views as a way to provide some structure to what is currently a mess of jQuery event bindings and DOM manipulation. So instead of have a Backbone view that gets configured with a template and passed a model to render, I just do some setup code in the initialize function and then use Backbone's event function to setup all my event bindings for different DOM events that will occur within the element that is the root of that particular view.

This is working really well so far. It doesn't require completely rewriting the app to be a single-page client side heavy application, but does provide a significant amount of structure to the code making it much more manageable. It also lets me reuse some views (sort of like widgets) that were previously tied directly to specific elements in the DOM.


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.


For some reason Python's indentation really bugs me, but I am totally ok with it in haml, sass, and yaml.


You must be a Ruby programmer.


Hey. I voted 'use Coffeescript a lot and JS a little'. I like to use the best tools, so to me learning JS was just a step on the way to learning Coffeescript as soon as I had heard about it. It always boggles me when people don't want to use better tools.

In terms of complaints, I'd say the main one is a few things missing from the big page of documentation that's on coffeescript.org - #'s are comments, function calls with multiple arguments need to have the left paren start immediately after the function name, how to pass anonymous functions. Those cost me a few hours taken together starting out.


Thanks -- if you want to open a ticket listing the documentation missing bits you've run into, we can get those taken care of.


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.


Sure, no HN poll is ever accurate, but as a rough sense, it's still quite useful. For more measured results, you can look at language popularity on GitHub:

https://github.com/languages/CoffeeScript


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




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: