Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

Is CoffeeScript used much outside of Rails? If not, wouldn't it be a better idea to focus on mastering javascript so it applies globally?


We've built a product in coffee-script that is made for navigating websites and forms logging and scraping and pulling in data.

It's quite useful outside of rails in that sense I'd say. It could have just as easily been done in JavaScript but I'm not a fan of the syntax(fuck curly braces)

I'd maintain that just about anything out there can be used outside of the context you think of it in.

Asking if coffeescript is useful outside of rails is similar to asking is perl is useful outside of scripting, it's a poor and misguided conception that languages can only be used in a certain way or with a certain tool.

I'd say that's true much more often than not that if you know a language well you can build complex applications with it.


I don't know Rails personally. Both at FiftyThree and with Thingdom, we use CoffeeScript with Node, both on the server-side and client-side.


I would recommend against using any CoffeeScript before you're proficient with JavaScript. It can be a great boon to productivity, but if you don't understand what it's doing underneath you'll shoot yourself in the foot a lot.


I like CoffeeScript but I agree with this.

Also, yes, plenty of people outside of the Rails community use CoffeeScript (I'm one of them)


After you load up the CoffeeScript module in your app.js (server.js etc) you can actually write an entire node.js app in CoffeeScript.


(Or just run the .coffee with "coffee" instead of "node")


True, I was thinking about universal deployment to PaaSes, etc


CS support is built-in to the Play! framework (Scala). By that I mean that it detects your CS files and compiles them for you as needed, then puts the resultant JS where it belongs amidst your static resources.


We use CoffeeScript with both Ember and Angular. Rails is not used.


CoffeeScript is, essentially, an unofficial Javascript 2.0. It's not at all tied to Rails.


I'm working on a Symfony/CoffeeScript/AngularJS/Bootstrap3 project right now. Haven't tried Ruby or Rails yet.


The presentation is very well put together, but CoffeeScript is a hack built on top of JS in order to use Ruby semantics. You're correct in that it's not really used outside of Rails, and not knowing JS proper (not that I personally recommend using it for much more than jQuery and a couple other libraries, when you absolutely must) poses a problem for when someone runs into the 97% of code that is JS.


"Not really used outside of Rails" - Do you have any source to back that up, or is it simply what you've seen? I first used CoffeeScript in a Python shop, personally.


Pretty much everything in this comment is wrong (though I do recommend learning JavaScript before CoffeeScript)

CoffeeScript is no more of a "hack" than any compiler. Compilers take one language and turn it into another.

I think you mean Ruby syntax, not semantics. CoffeeScript's semantics are much closer to JavaScript than Ruby in almost every way.

It may have it's roots in the Ruby world, but I'd wager more non-Rubyists use CS at this point than Rubyists. I'm one of them.


I write CS for nodeJS apps every day. The only Ruby I write is for Chef and it usually makes me mad. I've never written a Rails app.


You could possibly argue the semantics thing about Ember.


I'm currently using CoffeeScript on an Angular project with a Java Spring backend.


Well, surely JS is a better bet than CS, if that is what you mean.




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

Search: