Live data from Hacker News

Intro to CoffeeScript

aseemk.com

1–10 of 95 posts

Re: Intro to CoffeeScript

#3

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?

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.

Re: Intro to CoffeeScript

#4

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?

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.

Re: Intro to CoffeeScript

#5
> The explanation for most people’s dislike of CoffeeScript is probably our natural resistance to new things and our comfort in what we know.

This is a mildly insulting, as is the invocation of Blub.

CoffeeScript doesn't have a ton of exotic features. String interpolation, list comprehensions, and class definitions (!) are all familiar to programmers from other languages.

I'm guessing that a lot of people have weighed CoffeeScript's feature set against its overhead and decided the trade just isn't worth it.

Re: Intro to CoffeeScript

#6
post #3

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?

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.

Re: Intro to CoffeeScript

#8

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.

Re: Intro to CoffeeScript

#10
I stopped using CS because it's going to have some issues when ES6 becomes more of a real thing. For instance, how is CS going to handle for/of loops when ES6 has it's own for/of loops that is slightly different. The same goes for class and super.

There will have to be CS2 that introduces new semantics and old apps will have to be migrated.

Post reply on HN