Live data from Hacker News

In Which I Tell You to Stop Whining About CoffeeScript

singy.posterous.com

41–50 of 55 posts

Re: In Which I Tell You to Stop Whining About CoffeeScript

#41
I just finished a contract at a company of very smart engineers who decided to use Coffeescript way before I got there.

The guys that I was working with were way more brilliant than I am. Guys that have machine learning books on their desks for lunchtime and are doing some amazing work that is going to benefit hundreds of millions of people around the world.

To reference this quote from the article: "Any respectable CoffeeScript engineer should have a strong knowledge of JavaScript".

That, frankly, is not true.

One of the reasons I was brought on was to work on some javascript-heavy stuff. I was a newbie to coffeescript beforehand, so to hit deadlines wrote everything in vanilla js to save time and get work done. The guys on the team are very smart, but not really on top of the javascript game. So in this case, coffeescript was definitely being used because it was easier for them as traditional programmers.

Earlier this week, I spent a couple days and finally went through and ported everything over to CS.

In my experience of having manually written a complicated client-side app in js, then manually ported it to coffeescript, I really just don't like CS.

I'm used to Python. Indentation there is natural. Its idiomatic to what Python is. But its not in javascript. Granted, indentation should always be used in js for readability, but brackets really are needed to denote code blocks.

Another complaint I have against CS is that it tries to do so much stuff "as if by magic" that I was never 100% what my code was going to output. I just find:

    abc (arg,arg2) ->
to be really fucking confusing. Not to mention adding in the fat arrow, or 'do' if you need to wrap something in a closure.

I'm probably old school, but when I write code I need to know explicitly what it will do. I know what 'this' will refer to based on how I write. Same for closures.

Lots of times, my original code was just as concise as the coffeescript version, and a hell of a lot more concise than what CS rendered out.

So everyone has their opinions, likes and dislikes. For me, I'm gonna stick with native javascript for the time being.

Re: In Which I Tell You to Stop Whining About CoffeeScript

#42
I agree with OA spirit. But under "More than sugar" he only mentions surgary things like conciseness, readability, and saving time.

Also the title is total bull dooty, instead of saying what the title implies; "CS, it's for some, not for others. Shut up already." Or better yet not posting this crappy blog in first place. OA retreads the same horse beatings everyone else has ad nauseum.

Re: In Which I Tell You to Stop Whining About CoffeeScript

#43
post #4

> Consider the closure syntax in JavaScript: Proceeds to list example that isn't valid JavaScript. I have no fundamental objections with CoffeeScript, but I will never use it because there's nothing wrong with JavaScript that CoffeeScript improves upon. For me, personally, it's way easier to visually scan a file that looks like this: var helloWorld = function () { // ... } Than this: helloWorld -> // ... It's also ea…

Proceeds to list example that isn't valid JavaScript.

The example is in fact completely valid JavaScript, used in what I consider to be a very typical way: calling a function with an anonymous function as an argument.

I don't mind if you use CoffeeScript, but don't try and force-feed me some BS about concise syntax, make broad generalizations (complex CoffeeScript is harder to debug than JavaScript), or attack someone as a 'whiner' because they said "It's nice, but not my cup of tea."

I'm confused that anything in the article came across as "force-feeding". My impression was that he attacked someone as a 'whiner' because they said people at Posterous who use CoffeeScript are not "real" JavaScript engineers.

Opinion: Your mistake parsing his JavaScript example damages your credibility as a JavaScript programmer, and your rant suggests that you didn't read the article very thoroughly before coming here to tell everyone how wrong he is. I would downvote this comment if I could.

Personally, I've played with CoffeeScript and I am a fan of the syntax sugar, but I use exclusively JavaScript for all my projects because I disagree with the scoping rules.

Re: In Which I Tell You to Stop Whining About CoffeeScript

#46

CoffeeScript is not a language. It's a compiler to make JavaScript look like Ruby. Just like the superfluous idea of "semicolons are optional because of a design error", it's personal style. Be sure not to whine, though, when the abstraction leaks and your code breaks.

To make JavaScript look like Python, even. List comprehensions, significant whitespace, etc.

Re: In Which I Tell You to Stop Whining About CoffeeScript

#47

I wonder where the blow-back is generated from. Personally, and only anecdotal of course, I feel that I have seen a far greater amount of articles extolling the virtues of CoffeeScript than I have seen condemning it. To be honest, that is the only primary source of whatever trace of resentment I feel towards CoffeeScript: I'm just almost bored of hearing about it. ( tongue in cheek ) I don't use CoffeeScript, because…

From the article:

"I tend to be more critical of things before I’ve tried them, but I did try CoffeeScript to see what all the hype was about. It was nice, but it’s not worth it."

Apparently another blogger wrote that on his blog, and seems pretty even-handed with 'It's okay but not for me.'

The OP's response is "Stop whining and give it another chance." because clearly if someone tries CoffeeScript and says "Thanks, but no thanks." they're not smart enough to think on their own and should STFU and try CoffeeScript again.

Re: In Which I Tell You to Stop Whining About CoffeeScript

#48
post #40

I think a lot of the discussion about why CoffeeScript is or isn't better is really a proxy for the real issue which is, is it worth taking the time to learn it. People generally are motivated by feelings and the rationalizations come after. For awhile I felt like I did not want to learn CoffeeScript and that it was silly and annoying that people wanted me to waste time learning it. Honestly what really started to ch…

I think you come close to saying something very important but don't quite explicitly say it so I will.

CoffeeScript is a proxy war between JavaScript and Ruby developers. That's the whole "controversy" over CoffeeScript, to semicolon or not to semicolon, and everything in between.

JavaScript developers feel threatened by the influx of Ruby developers into their space and Ruby developers want to turn JavaScript into Ruby and get rid of those ghastly curly braces that cause them to have a panic attack.

Let's call a spade a spade.

Re: In Which I Tell You to Stop Whining About CoffeeScript

#49
post #40

I think a lot of the discussion about why CoffeeScript is or isn't better is really a proxy for the real issue which is, is it worth taking the time to learn it. People generally are motivated by feelings and the rationalizations come after. For awhile I felt like I did not want to learn CoffeeScript and that it was silly and annoying that people wanted me to waste time learning it. Honestly what really started to ch…

I think you come close to saying something very important but don't quite explicitly say it so I will. CoffeeScript is a proxy war between JavaScript and Ruby developers. That's the whole "controversy" over CoffeeScript, to semicolon or not to semicolon, and everything in between. JavaScript developers feel threatened by the influx of Ruby developers into their space and Ruby developers want to turn JavaScript into R…

Good point. I hadn't thought of it that way actually but that has got to be part of it.

For me, I sort of skipped over Ruby. I was too busy with other things to really get into it. So since I had more experience (not a lot, but more) with Python than with Ruby, that is what CoffeeScript seems like to me, instead of Ruby.

I always liked Python syntax, its just that I was busy with projects that involved a lot of HTML/CSS/JavaScript/PHP etc.

I have spent years and years writing C#/C/C++/JavaScript/PHP code with curly braces etc. To me, the curly braces and some other stuff are noise. Especially when you get into callbacks and have to remember to keep all of your curly braces and parenthesis straight. Its basically stuff that, as demonstrated by CoffeeScript, the compiler can take care of for you, but in JavaScript it just wasn't taken care of.

In a similar vein, JavaScript (and any other dynamic language or language with static type inference) demonstrates that type declarations aren't necessary, and that a language/compiler can usually take care of that stuff for you.

In a similar vein, C demonstrated (among other things) that managing the stack manually isn't necessary.

Ruby syntax to me is significantly more complicated than CoffeeScript and not really as clean (begin end blocks etc). I think that Rails has some important advantages in terms of software engineering, but the performance and syntax of Ruby turns me off a bit. Still, there is probably more good than bad so I might still end up doing some Rails stuff.

I don't think its advantageous to write an if statement backwards and I think people who wear black wire-rim glasses when they can easily afford contacts or don't even need lenses are ridiculous. I also have never owned a Mac in my life. I dual boot to Ubuntu/Windows 7.

Re: In Which I Tell You to Stop Whining About CoffeeScript

#50

CoffeeScript is not a language. It's a compiler to make JavaScript look like Ruby. Just like the superfluous idea of "semicolons are optional because of a design error", it's personal style. Be sure not to whine, though, when the abstraction leaks and your code breaks.

To make JavaScript look like Python , even. List comprehensions, significant whitespace, etc.

I thought this too, at first, but only because I didn't know Ruby very well. Now I realize it's heavily inspired by both, but actually more closely resembles Ruby, IMO.
Post reply on HN