Live data from Hacker News

CoffeeScript Means Giving Up on JavaScript

w2lessons.com

31–40 of 71 posts

Re: CoffeeScript Means Giving Up on JavaScript

#31

I really hope that we can finally end the tyranny of Javascript and allow programmer freedom. This is why PNaCl is so exciting -- just send LLVM bytecode which can be executed more directly and efficiently. You can choose whatever language you'd like! Imagine if every server (every. server.) had to run PHP on the backend and Java, Ruby, OCaml, even C just compiled to PHP. You would go insane. We don't have that situa…

Whoa, JavaScript is so much better then PHP.

From what I understand, working in Javascript is by default a terrible situation, and you have to go out of your way to do anything good (hence the plethora of structural frameworks). This is why you never see a book like "C: the good parts" or "Ruby: the good parts." And from my limited knowledge of it, the good parts of Javascript are Self (or, I guess, Coffeescript).

It's like people living near Albany NY who are "so close to Boston, NYC, and Montreal!" Yeah you may be close to "there," but you aren't there. I can assure you the people living in Boston, NYC and Montreal are never excited to visit Albany.

Re: CoffeeScript Means Giving Up on JavaScript

#32

This is like saying "JRuby is like giving up on Ruby's performance" or "learning Scheme means giving up on Lisp." If you can write Coffeescript faster and better than you can write Javascript, why wouldn't you write Coffeescript?

Posted a response:

Article: http://paulbjensen.co.uk/blog/2011/11/06/my-response-to-coff... HN Link: http://news.ycombinator.com/item?id=3203181

Re: CoffeeScript Means Giving Up on JavaScript

#33
Oh no, you have to learn two languages. The horror! If you know JS it takes about 10 minutes to learn CS, and all of that 10 minutes is learning about all the typing you don't have to do anymore. function function function function... I'm getting sick of it already.

Re: CoffeeScript Means Giving Up on JavaScript

#34
post #26
post #23

Earlier quoted context omitted.

Well you don't need to know opcodes, but that's an implementation detail. If you don't have at least a basic understanding of what the machine is doing, you will never be able to really understand the code you write.

Let's take someone who has learned Ruby outside of the classroom and is now attempting a relatively simple Ruby on Rails site. What disadvantages does he/she have not having studied assembly (as most com sci/engineers do at some point in their coursework)? Are these disadvantages major compared to, say, the disadvantages of not having learned HTML and attempting to be a RoR dev? I would guess no. But I've learned bot…

Ruby presents a VM; someone who understands the capabilities and limitations of that machine will be able to write Ruby code much more effectively than someone who does not, simply because they will understand what they are writing.

It would not shock me if most Rails devs were in fact Ruby tinkerers; and there's nothing wrong with that, if that's all you need to do.

Re: CoffeeScript Means Giving Up on JavaScript

#35
post #15

To quote the author: "For the extra effort you'll make learning CoffeeScript and its idiosyncrasies, why not put it towards really learning JavaScript?" There are so many wrong saying in this statement. First, understand that CoffeeScript is JavaScript - but without its idiosyncrasies. If you know JavaScript really well, learning coffeescript takes minutes. CoffeeScript embraces closures and prototype inheritence; it…

> First, understand that CoffeeScript is JavaScript - but without its idiosyncrasies.

...and a different syntax. That's my main objection to CS. I'm already working with 5 different syntaxes: Python, Javascript, Erlang, HTML, and CSS. Adding yet another one isn't appealing.

Perhaps if you're writing an app on top of the Node.js stack, you can use CoffeeScript everywhere. What I would've liked to see is CoffeeScript with a syntax as close to Javascript's as possible.

Re: CoffeeScript Means Giving Up on JavaScript

#36
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…

The situation of CoffeeScript and Javascript isn't the same. All the existing debugging tool will only show you Javascript code when you want to debug. C is different on that point. Almost all (if not all) the IDE in which you can code and debug allow you to debug without having to ever see any line of assembly. You don't have to understand the generated assembly code to code in C, because you will never have to look…

> All the existing debugging tool will only show you Javascript code when you want to debug

The key word here is "existing". This is about to change with CoffeScript support being worked on in Firefox (and some plugins like AceBug)

For details see: http://www.quora.com/CoffeeScript/Is-there-a-CoffeeScript-de...

Re: CoffeeScript Means Giving Up on JavaScript

#37

CoffeeScript will mean giving up on JavaScript. The more popular CoffeeScript becomes, the less proficient the overall developer population will be at JavaScript,especially if they spend most of their time writing CS over JS. The problem at the moment is that the world still works in JavaScript, not CoffeeScript. He rightly draws the analogy between jQuery and JS. I spend a lot of my time working on jQuery core, and…

"In a few years," Chrome and Firefox will have support for source maps. The average CS developer will be debugging in CoffeeScript, not JavaScript. The original author's argument is much weaker when this feature is considered.

Re: CoffeeScript Means Giving Up on JavaScript

#38
It's very gratifying to see how overwhelmingly the comments are both positive and in disagreement with Michael's blog post.

If you'd like to see the most complete explanation of why CoffeeScript is all about working with and embracing JavaScript -- not giving up on it -- the best resource is probably Brendan Eich's and my joint talk at this year's JSConf:

http://blip.tv/jsconf/jsconf2011-jeremy-ashkenas-5258082

But the other interesting thing here is how many of the comments point to the fact that most people who write posts about fears of CoffeeScript have never actually tried it. Having experienced a good deal of this myself, I have a pet theory about why this is the case...

First, the caveat that CoffeeScript is just a fun little thought experiment: I have no vested interest in whether you use it or avoid it for your project -- whatever suits you best.

Most esoteric programming languages are non-threatening. As a hypothetical programmer working on web applications, I can feel safe and comfortable in my ignorance of Haskell, Erlang, D, Io, Arc, and so on. They're far enough outside of the realm of possibility of adoption for my company that I can shrug them off with an "oh, that sounds interesting", and little more. Wanting to adopt one of them would require a whole new development and deployment stack, a new or ported codebase, and new integration costs with the rest of our system. You wouldn't expect to see an article talking about how people using Erlang are creating a "knowledge gap" for Java programmers.

CoffeeScript feels threatening precisely because it is so close to JavaScript, because the code can run with identical performance as hand-optimized JS anywhere that JavaScript can run, because any CoffeeScript library can interoperate seamlessly with any JavaScript library, and vice versa. It forces you, as a reasonable JavaScript programmer, to answer the harder question: Why haven't you tried it yet? Posts like these happen when folks try to rationalize an answer for themselves.

Re: CoffeeScript Means Giving Up on JavaScript

#39

CoffeeScript will mean giving up on JavaScript. The more popular CoffeeScript becomes, the less proficient the overall developer population will be at JavaScript,especially if they spend most of their time writing CS over JS. The problem at the moment is that the world still works in JavaScript, not CoffeeScript. He rightly draws the analogy between jQuery and JS. I spend a lot of my time working on jQuery core, and…

"In a few years," Chrome and Firefox will have support for source maps. The average CS developer will be debugging in CoffeeScript, not JavaScript. The original author's argument is much weaker when this feature is considered.

In the case that your prediction comes true, his (and my) concern that people need to know JS will probably not be as much of an issue. But then again, he'll be right about giving up on JS, and debugging in IE will still be a monster.

Re: CoffeeScript Means Giving Up on JavaScript

#40

Earlier quoted context omitted.

> To really program, you need to know assembly. That's just an absurdly untrue statement.

All abstractions are leaky to some degree. There will be problems you don't understand if you don't know what's happening one layer down. This is not to say there's something wrong with being a tinkerer - but it is saying that there is a difference between a tinkerer and a professional. http://www.joelonsoftware.com/articles/LeakyAbstractions.htm... for better writing on this topic.

[deleted]
Post reply on HN