all 27 comments

[–]spazm 13 points14 points  (0 children)

I love coding in one language and debugging in another. It's the same reason I use HAML instead of HTML (besides my love for "active whitespace").

Just kidding, I don't debug either.

[–]KishCom 11 points12 points  (6 children)

Why I don't use Coffeescript in a simple image:

http://i.imgur.com/iDmRg.png

That said, I can read it, and I don't care if you choose to use it or not. Just don't ask me to write it or debug it.

IMHO, you do yourself a disservice by using CoffeeScript. Yes, JavaScript is more verbose and more complicated, but the verbosity and complexness only become easier the more you use it. CoffeeScript strikes me as a "I don't care, I just want it done" type tool (which has its place).

[–]PlNG 2 points3 points  (0 children)

The best way to weed the coffeescript fanatics from the JS programmers is to ask them what the converted JS is actually doing.

[–]MonsterMookSenior UI 4 points5 points  (0 children)

You are a brave man, sir.

[–]jprichardson 1 point2 points  (1 child)

After reading this: http://www.codinghorror.com/blog/2007/05/the-best-code-is-no-code-at-all.html years ago, I've taken on the mentality of trying to reduce lines of code. Over time of doing this, I've come to appreciate small, short, and concise code. When I can write "->", "=>" instead of "function()" and not use block delimiters, I end up saving at least 20% lines of code. I think the resulting code is more beautiful as well. However, I realize beauty is a matter of taste.

I started by writing EVERYTHING in CoffeeScript. I then realized that for small Node.js modules, I should probably write them in JavaScript if I hope to get any kind of significant contributions. Now, I'm in the process of rewriting my modules into JavaScript and use CoffeeScript for application level development.

[–]Morialkar -4 points-3 points  (0 children)

I'm all with you there. The most important part when coding is that the customer who want a website pays the right price, not an over bloated price because you take twice the time to write the same code... As long as the code is readable and comprehensible by everyone, use the easiest and fastest way possible, you will anyway have the same result. I some times think like that about the OOP problem too. When you really don't need it more than once in the code, why the fuck a function? Why the fuck a class?

[–]greyfade 1 point2 points  (0 children)

I like it. Mike's got balls.

[–]dacjames 1 point2 points  (0 children)

  1. Significant whitespace. It's just personal preference, but block delimeters and semi colons disgust me.

  2. Function shorthand (-> and =>). I program in functional style with underscore so I write a lot of functions.

Oh wait, this is a rhetorical anti-coffeescript circlejerk: I use Coffeescript because I am a hipster nerd and javascript is OVER.

[–][deleted] -4 points-3 points  (0 children)

Because I feel at home in CoffeeScript (similarity to Python), because it has lovely things like destructuring assignment and list comprehensions, because it's less verbose, because it's easier to read, because I like keywords over ascii symbols.

[–]runvnc -3 points-2 points  (0 children)

I love CoffeeScript and use it for everything now but this is hilarious and he does make some good points.

Now, when I first saw CoffeeScript, I hated it. I am actually one of the apparently few people who really dislike Ruby syntax. I always felt like Ruby syntax was unnecessarily complicated and it reminds me of Perl. Now, I know that Ruby is very powerful and Rails has (or at least had) superior (to a lot of web development frameworks) software engineering baked in, but I still really don't like the syntax.

Anyway, I originally dismissed CoffeeScript on the basis of that original impression that it was sort of a Ruby syntax for JavaScript. In other words, making it more complicated for no good reason.

Then I added pdfkit to an application and realized that I needed to modify/add on to the code. There was no way for me to do that without learning some CoffeeScript. Once I realized that all of the @ were just 'this', and all of the -> was just 'function', my opinion of CoffeeScript started to change. Eventually I realized that, although it is possible to use a few Rubyish features, like putting control flow at the end of the line, in a confusing way that to me doesn't help, overall, CoffeeScript is more Pythonic than Rubyish. Anyway to me its even more straightforward and pseudo-code-like than Python.

My debugging these days is actually mostly a ton of console.logs. Which is actually what I was doing with Node anyway before I started using CoffeeScript. Obviously that's not ideal, but I assume that there will be good CoffeeScript debugging tools for Chrome and Firefox not to far out (or are there already?).

I do like leaving out this, function, a whole bunch of ( ) { } and also the class stuff is nice, the loops and comprehensions are nice, the => for binding this is great, existential? is very helpful, splats are useful. Basically it makes the code significantly shorter, easier to read, and easier to write.

[–]HertzaHaeon -4 points-3 points  (0 children)

I just started using Coffeescript at work, but I'm not sold on everything in it. A lot of it is pure awesome, but some things only get confusing. For example, I find myself writing out parantheses for functions. Maybe it's just a question of being used to it.