Live data from Hacker News

CoffeeScript Means Giving Up on JavaScript

w2lessons.com

1–10 of 71 posts

Re: CoffeeScript Means Giving Up on JavaScript

#2
As someone who was never completely comfortable with JavaScript, let me say that since I started using CoffeeScript and Jasmine with Guard, I have probably written more js features in two months than ever before.

I understand the point though, but for me it's about shipping, and really: CoffeeScript has made me write a lot more client-side code and make it with confidence, with fewer "wtf" moments.

I'm fairly sure at some point I'll need the help of someone who is really proficient with JS, but the benefits are still so obvious to me I'm really more than ok with it.

EDIT: someone on twitter asked what are recommended resources to learn CoffeeScript - I made a gist of what worked for me here: https://gist.github.com/1343059

Re: CoffeeScript Means Giving Up on JavaScript

#4
You can't write a program in C without knowledge of assembly, unless you're willing to defer debugging to someone who does.

You can't write a line of code in any language if you don't know, on some level, what it's doing in the machine (whether physical or virtual). Sure, you can, but you're not a programmer, you're a tinkerer. To really program, you need to know assembly.

But at some scale, your application becomes large enough that no one person, no matter how well they know the assembly it's compiled to, can hold the whole thing in their head at once. At that point, reliably adding a new feature isn't hard, it's impossible. There will be side effects you can't predict.

Abstraction isn't there for making hard things easy. It does, and that's nice, but that's not what we need it for. We need it to make impossible things possible.

Re: CoffeeScript Means Giving Up on JavaScript

#5
programming languages are a way of thinking (among other things)

whenever i think in coffeescript i think the same thoughts like i would think in javascript, but in a much cleaner, straightforward, more beautiful, less forward/backward jumping way.

coffeescript is just javascript.

Re: CoffeeScript Means Giving Up on JavaScript

#6
post #4

You can't write a program in C without knowledge of assembly, unless you're willing to defer debugging to someone who does. You can't write a line of code in any language if you don't know, on some level, what it's doing in the machine (whether physical or virtual). Sure, you can , but you're not a programmer, you're a tinkerer. To really program, you need to know assembly. But at some scale, your application becomes…

At some point, being able to forget about what's below is a rare skill. Focusing on building your app, without necessarily having to understand everything it depends on, is hard work if you're a bit curious.

Re: CoffeeScript Means Giving Up on JavaScript

#8
post #4

You can't write a program in C without knowledge of assembly, unless you're willing to defer debugging to someone who does. You can't write a line of code in any language if you don't know, on some level, what it's doing in the machine (whether physical or virtual). Sure, you can , but you're not a programmer, you're a tinkerer. To really program, you need to know assembly. But at some scale, your application becomes…

While that may be true for C but I found that it's not necessarily true for GWT -> JavaScript. Knowledge of the DOM API is more important than knowing JavaScript.

Re: CoffeeScript Means Giving Up on JavaScript

#9
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.

Re: CoffeeScript Means Giving Up on JavaScript

#10
> More importantly, [languages like CoffeeScript] all fail by requiring that you be an expert in two languages.

Why does this mean they fail?

> learning CoffeeScript and its idiosyncrasies

Which idiosyncrasies?

> The problem is that many programmers are turned-off by the lax nature of JavaScript

Maybe true of Dart, not of CoffeeScript

> but I urge you to ask yourself whether a move to CoffeeScript is sign that you've given up on learning it properly?

It isn't.

> we rarely have problems caused by the very things that CoffeeScript aims to eliminate

CoffeeScript is generally more readable and concise than JavaScript. It's just more pleasant to work with. Does it solve any problems for a narrow definition of "problem"? Probably not, but who cares?

I've noticed that most people who don't like CoffeeScript simply have a negative gut feeling about it, but have never really tried it. Or are trying to prove that they're better at JavaScript than you are (see http://stdout.be/2011/08/23/macho-programming/). I don't mind that: everyone is free to choose his/her own tools, and if one of the hot new tools everybody else seems to be using just looks ugly or stupid to you, whatever. I probably make my own fair share of weird toolkit choices. But I don't try to rationalize them with arguments that don't make sense.

Post reply on HN