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

I get down voted because I prefer native Javascript to Coffee Script? Wow.


sort by: page size:

Why downvote?, Coffeescript is not even a language. Programmers who use this crap must suffer.

I would assume it got "downvoted" by JavaScript developers that had to deal with it at some point.

(I personally prefer coffeescript)


I have to apologize. I fat-fingered the down vote when I originally meant to up vote your original comment. I think that my mistaken down vote was the one that initially sent your comment into the gray. This was unfortunate as yours was a remarkably civil post on a subject that can be somewhat controversial at times.

I am currently working on two projects written predominantly in CoffeeScript, and I completely agree with your original post. It is a mistake to think of CoffeeScript as simply another Javascript, and it is a mistake to make the assumption that people that are comfortable with Javascript will be comfortable within a CoffeeScript project.

CoffeeScript is more than just Javascript with a small sprinkling of syntactic sugar. There is a definite learning curve between Javascript and CoffeeScript. List comprehensions, extended regular expressions, and splats - these are just a few of the things that make up that learning curve. The changes in variable scoping that CoffeeScript makes is another.

I think that perhaps the best practice for publishing a CoffeeScript project should probably be to append a .coffee to the name rather than the usual .js. This would go a long way towards eliminating the kind of misunderstanding that you refer to in your OP.


Coffeescript isn't javascript, though.

I can't stand how people assert CoffeeScript looks good compared to JavaScript, as if it's some universally accepted opinion.

I don't agree with your opinion at all. Your claim that coffeescript is somehow 'better' than javascript is just false. You prefer one syntax, fine, but don't assume that it is somehow 'better'. I prefer Javascript. I do not prefer Coffeescript at all, and I get javascript, and have gotten it for 14 years.

I'm preferentially a CoffeeScript user, but for the sake of inclusivity, it really shouldn't be anything other than JavaScript.

This is laughable. CoffeeScript makes JavaScript look silly frankly. Preferring JS to CS is like preferring addition to multiplication.

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.


I still don't understand why I would want to use CoffeeScript when I can just use JavaScript.

CoffeeScript is actually pretty cool, from a few minutes spent with it it was just syntaxic sugar for js. Why don't you like it?

I have nothing against CoffeeScript, and I've used it on a few things, but in general I find JS to be an enjoyable language to work in. If I had more issues with the syntax or something, I might find the switch to CoffeeScript worthwhile.

Looks like you're right. Sorry. I must have confused you with some other commenter I read on HN today, it's a mistake on my part.

Having admitted this much, I'm still waiting for your explanation why you wouldn't "consider projects written in CoffeeScript JavaScript projects". I'd still downvote you for stating such a strong opinion without providing any rationale.


Coffeescript: Javascript doesn't match my tastes

Ugh, there is nothing wrong with JavaScript, please let's all just forget that CoffeeScript even exists. Thank you.

I'm a former diehard JavaScript guy who uses CoffeeScript pretty much exclusively now.

Your original comment did come across as a bit harsh but it didn't deserve anyone's downvote. I think your stance can be summed up similar to mine: Just because I haven't learned Coffeescript doesn't mean I don't plan to, or at the very least, doesn't mean I am against it. I (like you) would like to see the site's documentation in Vanilla because, after all, both Coffeescripters and Javascripters can read pure Javascript.

A side note, am I the only one that has noticed an increase in downvote-readiness here lately?


I don't think many use CoffeeScript because they don't "get" JavaScript. I think they use CoffeeScript because it gives them a much better JavaScript and makes them more productive and "happy".

The top articles about coffeescript posted in r/javascript are anti-coffeescript articles.

There are many reasons not to use Coffeescript.

Some may claim that 'coffeescript is javascript', it really is not. They say it with a straight face too. People that say this don't really understand the difference between DOM and Javascript, and it is very telling. Just because you can access DOM methods and properties using compiled coffeescript does not mean that the coffeescript syntax IS javascript, and nothing could be further from the truth. DOM is DOM. Javascript is Javascript. Coffeescript is Coffeescript. Confusing them just makes someone look like they don't know what they are talking about.

Anyway, javascript has been the only language used to code front-end websites for quite some time (thankfully vbscript in IE is not used any more) and as a result it has become very well know, widely written about, and quite a lot of code has been written in it. There is a wealth of experience and all the 'gotchas' are well documented and there aren't really that many of them if you don't count anything to do with the DOM. Coffeescript introduces its own gotchas. While it may fix/avoid a few of javascript's gotchas, it introduces its own. And worse, there are new releases of coffeescript that break compatability, so much that the latest version of coffeescript now adds a comment at the top of any generated code with the revision of coffeescript used to create the "transpiled" code. If you think changing the rules of the language regularly is a good way to develop software, then we don't have anything further to talk about.

There are limitations to coffeescript that make it difficult to work with. You can't have the same variable name used twice in the same source file. The var command is ambiguous, and coffeescript's syntax is generally more ambiguous than javascript leading to programmer error. It is more difficult to read coffeescript because of ambiguity that you don't get with C style syntax. Javascript uses clear delimiters { } for where things begin and end, coffeescript does not and this means 'less typing' in coffeescript, but at the cost of readability. Some say coffeescript is easier to read, more power to them. Hopefully I'll never have to read their code.

next

Legal | privacy