In Which I Tell You to Stop Whining About CoffeeScript
31–40 of 55 posts
Re: In Which I Tell You to Stop Whining About CoffeeScript
#32Fully agreed. The syntactic sugar saves lots of time in total, and there are few bonuses like for own key, value in hash that also checks `hash.hasOwnProperty(key)`, which is good practice in JavaScript, but really boring to type in almost all `for` statements. I also observed that using longer, more descriptive variable and function names, the difference between Coffee and compiled JS is definitely not an issue in d…
> but really boring to type in almost all `for` statements. Use _.each, you're done. Pleasure.
Re: In Which I Tell You to Stop Whining About CoffeeScript
#33I 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…
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 co…
Ah okay, r/javascript isn't in my regular rotation. So as I said, my only evidence is anecdotal.
Re: In Which I Tell You to Stop Whining About CoffeeScript
#34Earlier quoted context omitted.
s/professionals/Ruby fans/
I was going for brevity but the downvotes tell me I said too little. CoffeeScript is a tool by and for experts. I don't know where people got the idea it is there to help newcomers. It's clearly an opinionated abstraction that is designed around removing the things that are grating to deal with as professional JS programmers on large code bases. The benefits on a line by line basis are small, but on a large project t…
Re: In Which I Tell You to Stop Whining About CoffeeScript
#35The productivity issue that nobody seems to talk about: the damn compiler is slow. We're talking seconds, but it adds up. (The CSS compilers are far worse.)
I'm used to save/refresh/boom! when coding HTML. Now it's save, contemplate what the hell could possibly take so long, stare sadly at the compile output window, tab, reload, oops, reload again.
Re: In Which I Tell You to Stop Whining About CoffeeScript
#36Basically, I do have more of a problems with libraries which add layers of indirection (eg using _.each) at eval time when it could be done on CS at compile time.
So, once again, CS is JS, written a little differently and with some nice bonuses.
Re: In Which I Tell You to Stop Whining About CoffeeScript
#37> 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…
Nobody's* saying JavaScript is a poor storage, transmission, or machine-read format; just that it's not one humans should have to use.
* Some people do say this, of course.
Re: In Which I Tell You to Stop Whining About CoffeeScript
#38in which i tell you to take a look around outside your little bubble, posts on coffeescript (and all posts about software) need to be taken in context. This post's context, it seems, is the type of problem where your pain points are, it seems, "javascript: the bad parts". Coffeescript is pretty great at cleaning up the bad parts and if that's your pain point on a daily basis then coffeescript is probably great for yo…
hahahahaha.
Re: In Which I Tell You to Stop Whining About CoffeeScript
#39Fully agreed. The syntactic sugar saves lots of time in total, and there are few bonuses like for own key, value in hash that also checks `hash.hasOwnProperty(key)`, which is good practice in JavaScript, but really boring to type in almost all `for` statements. I also observed that using longer, more descriptive variable and function names, the difference between Coffee and compiled JS is definitely not an issue in d…
> but really boring to type in almost all `for` statements. Use _.each, you're done. Pleasure.
A quick test show that coffeescript's iterator is about three times faster. http://pastie.org/3783184
Underscore's nice, but I really like Coffeescript's iterator sugar.
Re: In Which I Tell You to Stop Whining About CoffeeScript
#40People 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 change my mind was that I needed to alter PDFKit, and I had to learn a little bit of CoffeeScript in order to do that. I think that the need to learn it came first and then later the rationalizations for why it was a good choice came after.
Another real issue that is below the surface but not mentioned while people are discussing the actual pros and cons of CoffeeScript: is JavaScript a good language, or is it fundamentally flawed somehow?
A professional JavaScript programmer's identity will often be tied in to some degree with his general JavaScript associations (the same way someone who races Formula 1 cars would identify with that type of car and might be offended if someone started attacking the body shape of those cars), and so to make a significant investment in learning CoffeeScript implies fundamental issues with JavaScript and may therefore be an attack on that person's identity. Obviously this wouldn't be a conscious thought process but the subconscious associations are often there.
Whatever is making people choose to learn CoffeeScript or not to learn it, its not really a rational process usually. Its more like a religious battle.
I think that the amount of time you have invested in JavaScript, how well you really know it, to what degree you have come to terms with/got over those pain points that CoffeeScript helps with, how much you identify with JavaScript versus other technologies, whether you actually have a specific need to learn CoffeeScript (i.e. for altering a library or reading a coworker's code), all of those things are going to add up subconsciously in a sort of vector for or against CoffeeScript that is pretty much an emotion which will motivate different rationalizations about specifics.
So in cases where that subconscious equation just isn't adding up in CoffeeScript's favor people will find all sorts of (often tangential) arguments against it. One thing that probably can help if you are trying to push CoffeeScript is to repeatedly mention certain small improvements such as using -> instead of writing function() or the class and extends syntax. That would mean that they would have to learn those things just in the process of the discussion. (Of course, they may want to stab you if you mention those things too many times though.)