6 ms·
CoffeeScript: Accelerated JavaScript Development
- elliot42 16y agoFor those unfamiliar with CoffeeScript: http://jashkenas.github.com/coffee-script/ http://jashkenas.github.com/coffee-script/
- EdwardMSmith 16y agoHmm, no beta. Love to see a sample chapter.
- shawndumas 16y agoAgreed; but with an availability date of 2011-06-20 we should see something soon.
- TrevorBurnham 16y agoThe book's page has just been updated with a few excerpts: http://pragprog.com/titles/tbcoffee/coffeescript http://pragprog.com/titles/tbcoffee/coffeescript Criticisms welcome. We're aware of some technical issues (most notably, there's no syntax highlighting for the CoffeeScript snippets), which will be fixed shortly.
- EdwardMSmith 16y agoJust bought the combo - looking forward to going through the beta! Thanks!
- TrevorBurnham 16y agoI'm the author. I was planning to post this link later, when the book becomes available. I can't share any details yet, but look for an announcement next week. I run @coffeescript on Twitter, so you'll definitely stay updated if you follow me there.
- deleted 16y ago[deleted]
- shawndumas 16y agoGet the "add to wish-list" button working on the pragprog.com page. Please and thanks!
- TrevorBurnham 16y agoThanks, I've let the PragProg folks know. There are a few other updates pending to that page as well. Incidentally, you could add it to your wish list on Amazon: http://www.amazon.com/CoffeeScript-Accelerated-Development-Trevor-Burnham/dp/1934356786/ http://www.amazon.com/CoffeeScript-Accelerated-Development-T...
- gsiener 16y agoSo here's a related question. If someone wanted to snag a developer that really understood coffeescript and js development, where should they be looking?
- MatthewPhillips 16y agoHacker News sounds like a pretty good place. Start an Ask HN.
- icey 16y agoThe "Who's hiring" thread will be created on Sunday. I'd try posting there.
- rjrodger 16y agoGo to jsconf and nodeconf in Portland next week.
- danenania 16y agoSomeone who really understands js can pick up coffeescript in a few hours, so don't pass on a good js developer just because they haven't yet made the jump.
- geraldalewis 16y agoI don't completely agree -- I feel like CoffeeScript shares as much in common with Ruby and Python as it does with JS. I'd say a good developer would be the best fit for a CS position; depending on your deployment platform, I can almost see a case where being an embedded JS programmer might actually cause issues. If all you understand is EcmaScript, all you'll write is EcmaScript. Despite its tagline being "It's just JavaScript", it's actually much more.
- danenania 16y agoI knew Python and Ruby before I started with CoffeeScript, so perhaps that colored my experience. CoffeeScript is basically a minimalized blend of js, Ruby, and Python syntax-wise. But I still think someone who understands js will pretty much automatically get CoffeeScript concept-wise, at least to the level they get js concept-wise, because the central concepts of programming in CoffeeScript aren't different than js, just the syntax.
- geraldalewis 16y agoThis is really great to see -- correct me if I'm wrong, but Trevor must be one of the biggest contributors to CoffeeScript. It's great to have someone so intimately familiar with the project author one of its first books.
- TrevorBurnham 16y agoI'll correct you. :) Code-wise, I'm only a minor contributor to CoffeeScript. I wouldn't be the right person to write a book on how the CoffeeScript compiler works. (Thankfully, some of those people agreed to be technical reviewers for the book.) But I have been an active participant in the language's community from early on.
- geraldalewis 16y agoI think I mostly recognize you from CoffeeScript's #issues on Github, where your comments are cogent and insightful.
- rmason 16y agoTrevor, Let me know if your book will include a simple CRUD app written in CoffeeScript using Node.js. That alone would gain you a few more sales.
- TrevorBurnham 16y agoHmm, I'm afraid it's a bit late to add another project to the book (there is a Node project, but it doesn't use persistence), so how about if I write this and post it somewhere else? Would you prefer MySQL or MongoDB?
- rmason 16y agoThank you! For the widest possible appeal I would choose MySQL.
- deleted 16y ago[deleted]
- jamesbritt 16y agoWhat experience do people have with other tools for generating javascript? https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS https://github.com/jashkenas/coffee-script/wiki/List-of-lang... I'm wondering how they compare, and what people have to say.
- TrevorBurnham 16y agoMany of those tools (including Coco, a CoffeeScript fork which is, objectively, more feature-rich) provide features to help manage asynchronous control flow (that is, to make callbacks look more like linear code). These proposals were rejected in CoffeeScript (see https://github.com/jashkenas/coffee-script/issues/350 https://github.com/jashkenas/coffee-script/issues/350) because they take the language too far away from the underlying JavaScript—in particular, CoffeeScript code would no longer necessarily have the same order as the JavaScript output. For heavily async code, those other tools are well worth looking at.
- gruseom 16y agoWe use Parenscript heavily. It's great. The full power of Lisp macros on top of efficient JS.
- kennymeyers 16y agoI still don't understand why I would want to use CoffeeScript when I can just use JavaScript.
- aaronbrethorst 16y agoAssembler and C. Java and Scala. Erb and Haml. CSS and Less/Sass. Edit: Walking and driving.
- unshift 16y agoAsm/C and Java/scala are unfair comparisons, since they're totally different languages with different structures and idioms. I just started using CoffeeScript for a project of mine and while it did clean up the messy look of the Javascript, it doesn't improve much upon Javascript feature-wise. I felt like I was still writing Javascript, it just looked a little better.
- jarin 16y agoIt does have some nice shorthand, but there is a lot to be said for having nice-looking code for its own sake.
- snprbob86 16y agoI've been writing CoffeScript daily for about 4 weeks now. On the first day, it seemed pretty minor. About three days in I was a believer. Now, when I write the occasional few lines of Javascript in my browser's console, it just feels so arduous to type. Whenever I pop open a Javascript library to read it, I feel like there is an assault on my eyes. I'm never going back.
- danenania 16y agoIt looks a LOT better, it requires a LOT less typing, and it saves you a LOT of stupid syntax errors and typos compared to brace-semicolon-comma-parentheses stew.
- jessedhillon 16y ago
- rgbrgb 16y agoCan't wait for beginner programmer books in CoffeeScript.
- TrevorBurnham 16y agoUnfortunately, it isn't really possible to understand CoffeeScript without understanding JavaScript, so it's not a very good choice of first language. JavaScript is. So, the book assumes at least a beginner-level understanding of JavaScript.
- rgbrgb 16y agoI have to disagree with you there. As there is a 1-to-1 mapping between CoffeeScript and JavaScript, I'd say that they are equally hairy first languages but the former has nicer syntax. The beginner documentation and workflow just isn't there with CoffeeScript yet. I'm actually not totally sure why you say that it isn't possible to understand CS without knowing JS. Is it because CS compiles to JS? If that's the case, I'd point out that you definitely don't have to know bytecode to learn Java.
- TrevorBurnham 16y agoWell, the "JavaScript is the new bytecode" analogy only goes so far. JVM bytecode puts few limits on what your language can do efficiently—Java, Scala, and Clojure, for example, all have great performance, despite having very different idioms. CoffeeScript, on the other hand, was clearly designed around what you can do with JavaScript. Or more precisely, what you can do while 1) producing predictable, readable, 1:1 output, and 2) getting good performance. So I think CoffeeScript is best understood in light of those limitations. Plus, learning CoffeeScript wouldn't be much use if the docs for every JS library read as gobbledygook, right?
- rgbrgb 16y agoYeah, I guess I was overreaching with my argument about bytecode. But, we can probably agree that it's more enjoyable to focus on writing good CoffeeScript than on writing CoffeeScript which will compile to good Javascript. Regarding the libraries, couldn't the same be said about learning Clojure without knowing Java (something which I think would currently be pretty acceptable)? All I'm getting at is that I'd like to see CS eventually become a language in its own right rather than an extra tool for JS developers. I think this is completely feasible if we start treating it that way and create the tools and documentation to that end. I think it is a serious improvement over JS and could eventually replace JS for the common programmer. By the way, thanks for all your work, I'll definitely be picking up the book.
- FreshCode 16y ago-1 post it when it's ready, not when you're ready to start promoting it.
- shawndumas 16y agoI, the OP, am not the author. I posted because I was excited.
- wsxiaoys 16y agoJust a a question: is there any project trying to wrap the Lua with some ruby-like sugar just like what CoffeeScript do to javascript? I think that will be fun since Lua's syntax is ... not so sweet i think.
- TrevorBurnham 16y agoNow in beta! Reposted here: http://news.ycombinator.com/item?id=2507418 http://news.ycombinator.com/item?id=2507418