Live data from Hacker News

We don't want your coffescript

blog.ponyfoo.com

1–10 of 51 posts

Re: We don't want your coffescript

#2
I'm not a CS lover, but I think most of your arguments are invalid. You say that you don't like CoffeeScript because it generates JavaScript code you don't understand. But do you understand what machine code will JS generate? No? Why? Maybe because you don't care... In general same thing applies here. If you need to debug generated JS, use source maps. This argument is not an excuse. Beside, CS is fairly simple in translating to/from JS. If you think it's not, try use dart2js ;)

Re: We don't want your coffescript

#3
Coffeescript is a tool rather than a language. The syntactic conventions of this tool form a sort of "shorthand" for "best practice" javascript which happens to be also almost as easy to comprehend as javascript itself, amounting to a net productivity gain.

Given that, coffeescript is nothing beyond javascript. It does not have its own ecosystem, its own libraries, its own type system or any of the other baggage that comes with some other compile-to-javascript systems.

Re: We don't want your coffescript

#4
Are there people that seriously can't just read CoffeeScript as-is? Are there seriously people that can't scan through the CoffeeScript docs in about 20 minutes and pick up the language more or less?

The first time I saw CoffeeScript I immediately realized, oh, fuck yes, this is obviously better, and switched over to it immediately. I was productive with it instantly. Is it really something worth spending your time arguing about in either direction? I mean, it feels like telling someone to quit using their English accent or slang when you only understand American. Reading CoffeeScript code is hardly an effort in trying to decipher a compiler, almost all of CS's constructs do exactly what you expect if you'd have to guess, and where they are not obvious the non-obvious is due to Javascript's oddities, not anything to do with CS.

A better analogy for CoffeeScript is not another language, but it's Javascript slang or shorthand. It's a practitioners dialect of the language.

Re: We don't want your coffescript

#5
In my experience, it took essentially zero time to understand and be able to write simple CoffeeScript. Yeah, it will take some minor effort, but I see it as as parallel to templating languages in terms of your argument. It is faster and cleaner to write, and makes my life easier. I have hardly (I think never) needed to look at the output for debugging, but when I have looked out of curiosity it seemed reasonable, just with strange variable names.

Does anybody have examples of some CS code that only differs from JS in terms of syntax (eg. not defining a class or something) but compiles to something weird?

Re: We don't want your coffescript

#6

I'm not a CS lover, but I think most of your arguments are invalid. You say that you don't like CoffeeScript because it generates JavaScript code you don't understand. But do you understand what machine code will JS generate? No? Why? Maybe because you don't care... In general same thing applies here. If you need to debug generated JS, use source maps. This argument is not an excuse. Beside, CS is fairly simple in tr…

Assembler is hard. JavaScript is not. It's a layer of abstraction that makes no sense to me either, particularly when there's a community of JavaScript enthusiasts already out there. If I was looking for open source project commits I know which I'd use.

Re: We don't want your coffescript

#7
post #5

In my experience, it took essentially zero time to understand and be able to write simple CoffeeScript. Yeah, it will take some minor effort, but I see it as as parallel to templating languages in terms of your argument. It is faster and cleaner to write, and makes my life easier. I have hardly (I think never) needed to look at the output for debugging, but when I have looked out of curiosity it seemed reasonable, ju…

I agree and I can't help but think that all the concerns about source maps and being unable to read the output comes from people who saw the transpilation aspect to the language and freaked out, and never actually tried to use it to get something done. The only time I had to look at the source was when there were bugs in the compiler. (This was years ago, and I submitted patches.)

Re: We don't want your coffescript

#8
post #4

Are there people that seriously can't just read CoffeeScript as-is? Are there seriously people that can't scan through the CoffeeScript docs in about 20 minutes and pick up the language more or less? The first time I saw CoffeeScript I immediately realized, oh, fuck yes, this is obviously better, and switched over to it immediately. I was productive with it instantly. Is it really something worth spending your time a…

Agreed completely. My only issue w/coffeescript is that, uh, I like clojurescript better. But clojurescript is all the things coffeescript is, just more---further from javascript, more concise, less compatible with standard js tools.

Re: We don't want your coffescript

#9
post #4

Are there people that seriously can't just read CoffeeScript as-is? Are there seriously people that can't scan through the CoffeeScript docs in about 20 minutes and pick up the language more or less? The first time I saw CoffeeScript I immediately realized, oh, fuck yes, this is obviously better, and switched over to it immediately. I was productive with it instantly. Is it really something worth spending your time a…

I can read it but it's a struggle. Much like reading Ruby, for someone who comes from Python. The syntax doesn't quite make sense to me and its usage varies between authors—a bunch of things are optional and used unpredictably (parenthesis, lambdas, indent-alignment).

Despite the Pythonish indent-based blocks, CoffeeScript is very much Ruby-like in syntax and culture. From my experience, fluent Ruby readers enjoy CoffeeScript much more.

Regardless, the point is that CoffeeScript != JavaScript. Doing things like answering JavaScript questions in CoffeeScript is simply inconsiderate and not very useful—much like answering Python questions in Ruby.

It's true—I could go ahead and learn CoffeeScript and become more fluent at it if I wanted to, but I don't. I actually like JavaScript as it is, especially the newer specifications. Same way I choose to continue using Python rather than learn Ruby more thoroughly so that I can benefit from random Ruby answers to my Python questions.

Re: We don't want your coffescript

#10
My biggest problem with CS is it's a space sensitive language that comnpiles to a space insensitive language.

Given that you'll typically interact with wild west JS that adheres to no spacing conventions, having to juggle strict spacing vs arbitrary spacing seems looks a headache.

Post reply on HN