Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Anybody else really bothered by this?

     CoffeeScript is JavaScript done right.
Does CoffeeScript somehow fixes all the quirks of the javascript language that we've grown s/to love/with?


sort by: page size:

If anything, coffeescript is the status quo. People just assume it's the hip thing to do; that if you're using JS it's because you simply haven't bothered evaluating coffeescript.

What problems do you think coffeescript solves?


> My primary issue with CoffeeScript: people that use it insist that it's JavaScript.

Because, semantically, it is the same as JavaScript (for the most part). It just looks different.


Except not all of JavaScript is a valid CoffeeScript.

you're doing something wrong if this is an issue for you.

I personally would like to apologize to everyone for dissing CoffeeScript in the past, here (thus my low karma) and elsewhere.

I'm working with a new customer now, three weeks already. and they're using CoffeeScript. and I had to get over myself and start using it. and it's amazing. I've been so stubbornly blind to be against it without actually trying it out yet cursing and flaming against it. it's so much faster to work with it, it reduces the boilerplate code, it simplifies everything.

and, yes, I still think you need to be able to know and use JavaScript very good before taking on CoffeeScript -- otherwise topics like the one we're discussing here arise.


Interesting seeing the high likes and dislikes for coffeescript. Recently there have been a few articles about xyz moving to JavaScript from coffee and how it writes non performant code. I still find JavaScript hard to write without libraries and remembering specific gotchas that coffeescript takes care of without me thinking about.

Coffeescript isn't javascript, though.

I doubt that the CoffeeScript-haters would accept any compile-to-js language. Maybe it's language stockholm syndrome. ;)

But for me, JavaScript's shortcomings are far worse than CoffeeScript's.


but coffeescript IS exactly javascript with a bad syntax translator. It' not a "considerably better language" it's the same language.

Does anyone else find CoffeeScript insufferably unreadable? Why take a basically nice-looking language like JavaScript and bathe it in special forms?

I think a lot of the frustration comes from people thinking that CoffeeScript is proposing itself as being a replacement for javascript or even a full abstraction from javascript.

CoffeeScript is a tool you can use to write javascript more conveniently, and more consistently.

It is not a replacement for knowledge of, or usage of javascript. You're still going to have to know how javascript works and CoffeeScript never claims otherwise. People who either don't understand or are too excited by it's blissful syntax are the ones that do.

Are you Douglass Crockford or John Resig? Then you're probably gonna stick to straight javascript as you can already write consistently rock-star javascript. Are you an overworked dev just trying to write some js without mucking things up too much? Then whip out coffeescript and let it help you do that. Then check the source it generates to make sure everythings going well(and get better at JS by reading it).


You're spending so much effort to distance yourself from javascript, when javascript isn't difficult, and coffeescript doesn't solve many problems while introducing its own problems. You must be a masochist if you support coffeescript so much and just refuse to code javascript. It's just such a backwards way to develop. Coffeescript is not becoming "widespread", and it doesn't require a "hacker mentality", it is simply a syntax fetish that dithers modern web development. It is a "made-up" language that has been way over-hyped to the point that people start believing that it's a good thing to stick yet another abstraction layer between the DOM and the code. Updates to coffeescript have broken existing code, how is this a good thing? Good luck with that.

The point of CoffeeScript is not to be "different" from JS, it's supposed to be easier than JS. It moves the language out of your way, that is all.

CoffeeScript sure does have some problems of its own, but it was designed to be compilable to JavaScript.

And of course developers are not going affected by the flaws mentioned in the snippets, but they're present and not nice. Would you like to work on a desk that's always messy?


My primary issue with CoffeeScript: people that use it insist that it's JavaScript.

Example: I see a post on HN or in one of my RSS subscriptions about a great new JS library or plugin, only to click through and see a page full of CoffeeScript examples, and the source code is written in CoffeeScript as well. This is not JavaScript. I will not learn CoffeeScript just to decipher your plugin or library and integrate it into my JavaScript project. And no amount of forceful whining on your part will convince me that it's so readable and intuitive and minimal that there is no significant learning curve there.


The goal of this diatribe appears to be to justify CoffeeScript's design, but to me it counts against it. To be fair, I have never thought CoffeeScript was worth using, but here's the crux:

The pitch: "CoffeeScript is a better syntax for writing JavaScript."

The reality: "CoffeeScript does not behave like JavaScript in subtle, non-syntactical ways."

It is often suggested that people use CoffeeScript instead of JavaScript. But this understanding of CoffeeScript is inaccurate. CoffeeScript has different semantics from JavaScript, and the obvious expansion of CoffeeScript back into JavaScript is a wrong expansion. A knowledgeable JavaScript developer will make mistakes when making simple changes to CoffeeScript code that they did not write. They will have difficulty fixing bugs in CoffeeScript code.

If you like, you can be a CoffeeScript shop. Find senior developers who use CoffeeScript and teach junior developers to use it. Code will be a little easier to write, and, like nerf guns and foosball, you might seem like a superficially cool place to work. Like any new technique, you'll be out on your own. You'll run into bugs, you'll deal with toolchain support, you'll find optimization issues.

There are reasons to translate other languages into JavaScript. Macros, static typing, execution in other contexts. CoffeeScript gives you ruby-like syntax... To me, that just doesn't seem worth it.


I like having things like list comprehensions. I like having a sane scoping system (as opposed to jsl and "best practices"). I'm also pretty fond of the syntactic sugar being offered (the existential operator in particular).

Coffeescript just gives syntax to common patterns being used in js. For the most part, it feels like a bunch of really nice macros that encapsulate those patterns, making them less error-prone, easier to read, and easier to maintain. I'm not really sure what the concern here is, since most of the post seems to assert that people who use coffeescript don't know js, or that these shortcomings could be addressed equally as well by a large framework system. I can't imagine anyone actually believes the former, and while the latter may be true I don't know why that framework will be so much easier to learn, use, and maintain than the equivalent coffeescript.


Javascript is one of my favorite languages, Coffeescript makes a great language impossible to debug.

That's just an implementation detail. CoffeeScript has syntax and semantics every bit as valid as JS's.
next

Legal | privacy