If you feel like providing any more color beyond your vote, your impressions after using CoffeeScript in anger -- I'd love to hear 'em.
If you feel like providing any more color beyond your vote, your impressions after using CoffeeScript in anger -- I'd love to hear 'em.
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.
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.
* 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 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/
* 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}/") ; returnThe 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.
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.
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.
BTW I love Backbone and Underscore and thanks to them (and also node) JS is actually more fun than ever.
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.
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.
Other than that I see a lot to like in CS though.
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.