5 ms·
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
by jashkenas 15y ago
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.
- grandalf 15y agoThis 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.
- PetrolMan 15y agoI'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.
- markkanof 15y agoI'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.
- irahul 15y agoYou 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.
- eropple 15y agoUsed 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.
- true_religion 15y agoI'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.
- eropple 15y agoI'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).
- 3pt14159 15y agoI'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.
- bruth 15y agohttp://jashkenas.github.com/coffee-script/ http://jashkenas.github.com/coffee-script/ http://coffeescriptcookbook.com/ http://coffeescriptcookbook.com/ Tutorial/screencast links: http://stackoverflow.com/questions/5124706/is-there-a-screencast-tutorial-site-for-coffeescript http://stackoverflow.com/questions/5124706/is-there-a-screen... A talk by Jeremy: http://ontwik.com/javascript/jeremy-ashkenas-on-coffeescript/ http://ontwik.com/javascript/jeremy-ashkenas-on-coffeescript...
- 3pt14159 15y agoInteresting. 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.
- dualogy 15y ago2 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.
- bruth 15y ago> "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.
- cageface 15y agoMaybe 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.
- wvenable 15y agoUnfortunately, 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.
- jashkenas 15y agoSure, 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 https://github.com/languages/CoffeeScript
- joebo 15y agoI'd roughly estimate that 5% to 10% penetration on HN means 1/10% in the larger population.
- amccollum 15y agoI 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.
- sitkack 15y agoI 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/ http://ipython.scipy.org/moin/) shell along with pdb (http://muffinresearch.co.uk/archives/2008/04/27/python-debugging-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).
- clyfe 15y ago* 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
- sitkack 15y agoThank you both for these links, I am off to a very good start.
- ehsanu1 15y agoFor debugging, see node-inspector: https://github.com/dannycoates/node-inspector https://github.com/dannycoates/node-inspector For details about modules: http://nodejs.org/docs/v0.4.8/api/modules.html 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/ http://vowsjs.org/
- mariuskempe 15y agoHey. 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.
- jashkenas 15y agoThanks -- if you want to open a ticket listing the documentation missing bits you've run into, we can get those taken care of.