Live data from Hacker News

We don't want your coffescript

blog.ponyfoo.com

41–50 of 51 posts

Re: We don't want your coffescript

#41
post #39
post #29

You need to get more benefit from the abstraction than the cost. I couldn't find it, in cs. I've made thousands of mistakes (on a daily basis it feels like). In 17 years I don't think I have ever once forgotten to put 'var' in front of a variable declaration.

its not about if you make the mistakes or not per se, its about the removal of unnecessary mental burdens.

Exactly. Opening up the air, so to speak.

Re: We don't want your coffescript

#42
post #24

> Always compile your code down to JavaScript before posting a question to StackOverflow, or replying to a blog post. You might even learn things about JavaScript itself, too. I don't see author's enormous arrogance backed by any efforts to think about his reasoning.

agreed.

Re: We don't want your coffescript

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

This might be shortsighted, but maybe the fact that Discourse was not "getting as many contributions as they expected simply because their JavaScript was obfuscated behind Coffee" is a good thing. Surely, the higher quality contributors prefer CoffeeScript. ;)

Re: We don't want your coffescript

#44

Earlier quoted context omitted.

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.

coffee-script is not less compatible with standard js tools. Again, "it's just javascript" and you can use backticks in coffee to get embedded js. Common mistake made by coffee-script-nay-sayers.

He's probably referring to debugging etc.

Re: We don't want your coffescript

#45

Earlier quoted context omitted.

coffee-script is not less compatible with standard js tools. Again, "it's just javascript" and you can use backticks in coffee to get embedded js. Common mistake made by coffee-script-nay-sayers.

Give me a break, you know what I mean. When you look at the page source, do you see embedded coffeescript? Can you debug in coffeescript with the standard tools? I know these things aren't possible and shouldn't be expected b/c coffee is a "compiled" language...but you can do them in javascript, and telling the vanilla js programmer that they're "exactly the same" is being less than honest.

For "vanilla js programmer", coffee-to-js-correspondance probably doesn't matter anyway. But the point of coffee is that compiler output is very straightforward. While I have to admit that tooling is far from good enough at present, I personally have no problem reading any js generated by coffee, even without source available to me. Apparently many[citation needed] coffee users can do this.

What really made the "vanilla js programmer" feel uncomfortable, I speculate, is the correct way of handling javascript oddities, such as handling nulls (`?` in coffee). They are daunting -- but ignorance is no excuse. Once you start to populate these patterns yourself in your javascript, not only would you immediately recognize them in coffee-generated js, but also you'd appreciate that coffee abstracted them.

I think these common points against coffee mostly apply to other compile-to-js languages such as clojure-script, where the generated code almost always made no sense to a "vanilla js programmer".

Re: We don't want your coffescript

#46
Coffeescript has made me roughly 6x-8x more productive in writing 'javascript.' I can't fathom how anyone that spends more than 4 hours trying to use doesn't see the same results.

My biggest fear was debugging, but it was/has been absolutely no issue whatsoever.

Re: We don't want your coffescript

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

+1, CS can be learned in few hours and any questions on what each constuct produces can be quickly resolved in coffeeconsole for chrome

Verification: lead development of 50MD and 300MD mobile html5 apps for major UK TV's and even people who did see CS first time were able to pick it up quickly. I had literally about 5 cases when I had to answer some chat questions on how CS works, and about the same count when I corrected/optimized some CS usage in a code review.

The productivity gain was impressive. In ducktyping, but esp. in __understanding__ the code quickly.

We're not going back.

Re: We don't want your coffescript

#48
post #18

Earlier quoted context omitted.

> does nothing to address the things that I hate about writing JavaScript (oh, the weakly-typed type system for one thing It can't because it's actually JS, by design. Yet it dutifully tries as hard as it can within this design goal by e.g making its == compile to JS ===. Maybe you'd rather be interested in ClojureScript or Dart, which use JS merely as a VM instead of their systemic core. > If a front-ender on my tea…

> Yet it dutifully tries as hard as it can within this design goal by e.g making its == compile to JS ===. Now we're effectively losing the "==" operator, which is behaving like in most other traditional scripting languages (e.g. Perl). What did we win by losing an operator? Why obfuscate that this is not the JS "==" operator but most likely the "===" operator?

Either one wants weak typing or strong typing, but one cannot have both. "most other traditional scripting languages" consists of Perl and PHP (not even (ba)sh/test, to which == is string comparison whereas -eq is integer comparison), while languages typically used on the backend together with JS/CS include Python, Ruby, Java, C#, and whatnot, none of which have such an error-prone feature.

> What did we win by losing an operator? Why obfuscate?

Type safety, and resistance against both bona fide errors and clueless developers. Sane defaults matter.

Re: We don't want your coffescript

#49

Earlier quoted context omitted.

coffee-script is not less compatible with standard js tools. Again, "it's just javascript" and you can use backticks in coffee to get embedded js. Common mistake made by coffee-script-nay-sayers.

Give me a break, you know what I mean. When you look at the page source, do you see embedded coffeescript? Can you debug in coffeescript with the standard tools? I know these things aren't possible and shouldn't be expected b/c coffee is a "compiled" language...but you can do them in javascript, and telling the vanilla js programmer that they're "exactly the same" is being less than honest.

sure, using source maps in chrome dev tools, I can work directly with coffee source, the same way I work with less source instead of compiled css

Re: We don't want your coffescript

#50

Earlier quoted context omitted.

coffee-script is not less compatible with standard js tools. Again, "it's just javascript" and you can use backticks in coffee to get embedded js. Common mistake made by coffee-script-nay-sayers.

Give me a break, you know what I mean. When you look at the page source, do you see embedded coffeescript? Can you debug in coffeescript with the standard tools? I know these things aren't possible and shouldn't be expected b/c coffee is a "compiled" language...but you can do them in javascript, and telling the vanilla js programmer that they're "exactly the same" is being less than honest.

chrome/ff dev tools have source maps support, I can work directly with coffee source the same way, as I work with less source instead of compiled css ... only coffeeconsole is in a separate tab via chrome extension
Post reply on HN