News for hackers. Stuff that matters.
Re:Tower.js - JavaScript Framework for Node.js modeled after... by eldude on Monday February 27, 2012 @04:54PM (#3640829)
I'm going to reply to my own comment in order to address the numerous responses all at once.

First, I'll establish some modest authority on the subject by pointing out that I've worked directly with Tim Caswell, who helped create CoffeeScript, at multiple jobs now. He's explained to me how they developed it and we've discussed the merits of it.

Second, I don't believe CoffeeScript is lacking merit. I make no claims of such. I'm actually happy that CoffeeScript exists in that I hope it brings more people into the JavaScript fold so long as it does not detract in ways like this.

Third, I understand what CoffeeScript is and how it works, but have chosen not to learn it. That's my prerogative and I make no claims to the superiority of that choice apart from my choosing it.

Fourth, I _could_ talk about how time is not free. Installing a CoffeeScript compiler, learning CoffeeScript, undertaking the mental frame of reference change necessary to switch between context, are equally not free, but I don't feel the need to further this defense as it has been made many _many_ times before, especially here on HN.

In reality, this is about none of the above. This is labeled as JavaScript when _it is not_. I repeat, CoffeeScript is _not_ JavaScript. To the many responses this will incite, I'd direct you to my points above. This is not intrinsically a bad thing. Far from it, if CoffeeScript was not different, it would not be relevant. It is its difference that makes it relevant. I will likely eventually learn CoffeeScript when it becomes necessary or worth it. In fact, I attempted to previously, but setting up auto-compilers, etc... took about 20 minutes too long, and given the insufficient value proposition, I didn't bother to finish learning it.

I come across many node/JavaScript/Github projects regularly and don't have the time to bother learning or using 90% of them, but I bookmark them because they are intriguing and I hope to have them if and when I do need or want to use them. That's 9/10 _JavaScript_ projects that I don't get to just because I don't have the time.

I'll repeat my main point because that is all my original comment was ever about, if CoffeeScript is not different, there's no point in it existing; if it is different, then it's a positive reason otherwise it would receive no attention; if it is positively different, then why not market it as such? It's obvious that those who point out that CoffeeScript is a dialect and compiles to JavaScript so it is therefore an acceptable mis-labeling are attempting to have their cake and eat it too at the expense of people like me that either have not taken the time to learn it yet, or do not care to for _numerous_ philosophical reasons which I defend are quite valid, though being a pragmatist, ultimately will not factor into my reasoning.

Re:Tower.js - JavaScript Framework for Node.js modeled after... by pooriaazimi on Monday February 27, 2012 @05:43PM (#3640991)
What I as one of your downvoters argue is that it doesn't take more than an hour to learn CoffeeScript. I don't believe anyone is arguing that it should be labeled as JS when it's CS.

What made me downvote both your original and this comment is that I can't accept that you (seemingly) write a lot of code in JS, but don't want to spen just 1 hour to learn CS properly (I know it takes this short, because I just did it a while ago. I haven't written any JS code since I was 14 - 6 years ago - but started reading coffeescript.org and in 3 hours was able to do everything I wanted in CS. So for a JS master like yourself it wouldn't take longer than an hour to master CS too).

To me, your comment sounded like an abacus master who doesn't want to learn Arabic numbers and multiplication table, because he's too busy. And again, I have nothing against you and downvoting a comment on HN !== hating you and/or disagreeing with everything you say or think.

Re:Tower.js - JavaScript Framework for Node.js modeled after... by eldude on Monday February 27, 2012 @06:28PM (#3641125)
This pervasive assumption of CoffeeScript's superiority as a foregone conclusion is ridiculous. There are so many excellent JavaScript programmers that choose not to program in CoffeeScript for so many reasons, that it's surprising to see the extent of this assumption. Defend the merits of CoffeeScript all you want, I'm not even bothering to argue with you about them, and _I even conceded already that it does in fact have merit._ However, if at JSConf this year, I start seeing a bunch of projects presented in CoffeeScript, but advertised as JavaScript, I'm going to simultaneously be incredibly annoyed at the presumptions of such behavior while I learn CoffeeScript in order to follow along because it will have crossed the threshold.

My original point still stands that this is a mislabeled title. If this is JavaScript, and I know JavaScript, then I'd be able to understand the code without learning something else. Yes, again, I _could_ go learn that thing and thus understand the documentation as I almost certainly eventually will, but how disingenuous of the CoffeeScript community to refuse to call CoffeeScript by its name, expecting _everyone else_ to learn CoffeeScript in order to treat it as equivalent, when it very clearly is not. Just be straightforward and call it CoffeeScript _because you think CoffeeScript is awesome_.

Why on earth is this disturbingly so objectionable?

Re:Tower.js - JavaScript Framework for Node.js modeled after... by tjholowaychuk on Monday February 27, 2012 @06:57PM (#3641194)
+1

I've never disliked the fact that it was built, everyone has fun playing around with little transpiler things but it's turned into some retarded religious warfare. The show-stopper for me is when it gets to the point of pull-requests containing "Add coffeescript support". Once you go that far it's just flat-out wrong

Re:Tower.js - JavaScript Framework for Node.js modeled after... by Detrus on Monday February 27, 2012 @11:54PM (#3641939)
People who write libraries and frameworks want to advertise them, get good SEO from the larger JS community. So they'll call their projects Blah.js.

It's also easier to remember JS libraries as Blah.js instead of having to worry that it's Blah.js or Blah.coffee.

Yes it is somewhat dishonest. But users of a lib or framework should not be reading its code in most circumstances. Otherwise it's crap API/documentation.

With CoffeeScript you can use the lib from JavaScript seamlessly. It is essentially Blah.js. If the lib was written in Ojb-J or ClojureScript that's another story. Then lib authors couldn't say it's Blah.js.

If you need to read coffee code as JS for some reason, compile it. If you need to submit a patch, doing it in CoffeeScript will indeed be a minor inconvenience. Not so for Clojure, Obj-J or whatever else will come along.

---- And on another note. These languages compiling to JS are essentially causing fragmentation. If ClojureScript gets as popular as CoffeeScript is now it won't be pretty. I'll bet that CoffeeScript will reach critical mass at some point. The newest libs and tutorials will all be Coffee. JS.next should adopt as many features as possible or promote it as the new standard to stem the tide and make fragmentation less obvious. CoffeeScript would be more stable as a language, hard to make JS semantics prettier.

Re:Tower.js - JavaScript Framework for Node.js modeled after... by phillmv on Monday February 27, 2012 @07:04PM (#3641205)
>Why on earth is this disturbingly so objectionable?

Ruby dev here with limited JS/CS knowledge. Are there any sections of CS where the semantic mapping to JS is not obvious? It took me about five minutes to figure out what was going on.

Re:Tower.js - JavaScript Framework for Node.js modeled after... by pooriaazimi on Monday February 27, 2012 @07:12PM (#3641224)
I completely agree with you about the title, as I've said it twice already (thrice, including this one!). What I completely disagree is the other parts of your original comment.

I wish you the best regardless of your scripting language of choice! :)

Re:Tower.js - JavaScript Framework for Node.js modeled after... by tolmasky on Monday February 27, 2012 @07:18PM (#3641238)
You end by saying that downvoting !== hating him or disagreeing with everything he thinks, yet I can't find a worse reason to downvote than the explanation you gave right before: you literally downvoted him because of a personal decision he makes in his life that affects no one else regarding the learning of a programming language, and not at all for any factual inaccuracy in his comment.

He never said anyone else should not learn CoffeeScript nor that CoffeeScript was bad, but that for whatever reason in his own personal life it hasn't become valuable enough to do so. And yet still, the point of his comment had nothing to do with that, and instead simply requests that stories be labeled accurately. Seems completely uncontroversial to me.

Re:Tower.js - JavaScript Framework for Node.js modeled after... by pooriaazimi on Monday February 27, 2012 @10:47PM (#3641802)
Of course I downvoted him because I disagreed with what he was implying! Downvotes are not just for burying trolls, but meant to be a mean of expressing how much you agree with a comment (the opposite of an upvote).

in the last part, my emphasis was on the word everything. If you divide that comment into two different comments (first being 'misleading article' and second, (implicitly) 'I don't want to learn CS, though I write code in JS regularly'), I'd up vote the first and down vote the second comment.

It is true that his decision does not affect anyone else, but I don't believe that even such decisions can't be criticized. And I'm arguing that his decision of not wanting to learn a dialect of a language he uses on a daily basis (that would take a very short time) is not a good one, and is un-hackerish. If he had taken time to learn and have decided that CS is not for him, I neither would've down-voted him, nor would I comment on his decision.

I'm sorry if I wasted your's or any one else's time by my comments on this unimportant matter. I know that HN's comment section is meant to be a place for constructive arguments, but I couldn't help it. I read that an unseen friend is doing something that I think is really wrong, and I can't help mentioning it.

Re:Tower.js - JavaScript Framework for Node.js modeled after... by jeswin on Monday February 27, 2012 @10:27PM (#3641754)
In my three years of being on this website, I haven't had to downvote anything except spam or deliberate trolling. And that too, rarely.

Maybe it is a good idea to have the value of downvotes diminish the more you use them.

Re:Tower.js - JavaScript Framework for Node.js modeled after... by zalew on Monday February 27, 2012 @11:21PM (#3641867)
Second that. Before maybe about half a year ago, I rarely observed downvotes on comments that are not rude, worthless, ot totally offtopic. Now the fluctuation of up/downvotes on comments (including mine) got out of hand and people use it to 'disagree'. It's stupid. I wouldn't mind if pg removed downvoting at all.
Re:Tower.js - JavaScript Framework for Node.js modeled after... by pooriaazimi on Monday February 27, 2012 @10:55PM (#3641821)
I think of downvotes as opposite of upvotes. If you agree with the gist of a comment and find it informative or useful, you upvote it. If you really disagree, you downvote it (and if possible, drop a line to say why you disagree). If I'm wrong and that's not the way things are being done here, I apologize from OP.

I think another way could be to decrease a users karma by 1 for every 5 downvotes he makes... and also limit the number of downvotes a user can make in a day.

Re:Tower.js - JavaScript Framework for Node.js modeled after... by malandrew on Monday February 27, 2012 @08:48PM (#3641443)
It's not just an hour to learn. There's also the time to set up tools and environment. It's added complexity up front, and that alone is enough to turn people off because there is nothing so wrong with javascript to warrant the effort.

If you know javascript well and are familiar with it's many gotchas and you know how to use your text editor well with javascript, the coffeescript really doesn't add more than it detracts.

Re:Tower.js - JavaScript Framework for Node.js modeled after... by thenduks on Tuesday February 28, 2012 @12:16PM (#3643901)
So, with something like Tower.js the code is written in coffee to start with (https://github.com/viatropos/tower/tree/master/src), but in the repo (and in npm) you'll actually get the resulting JavaScript as well (https://github.com/viatropos/tower/tree/master/lib and https://github.com/viatropos/tower/tree/master/dist).

This is generally true of most CS projects. I can't speak specifically to whether or not you can use Tower.js without coffee, just saying don't discount a project because the author wrote it in CS. Spine.js (http://spinejs.com) is a great example of what I'm talking about.

Re:Tower.js - JavaScript Framework for Node.js modeled after... by weixiyen on Monday February 27, 2012 @07:40PM (#3641290)
Are you arguing the HN title or the site description?
Re:Tower.js - JavaScript Framework for Node.js modeled after... by eldude on Monday February 27, 2012 @11:20PM (#3641864)
The HN title. It feels like a bait-and-switch when I click a "JavaScript" project link and see CoffeeScript documentation.
Re:Tower.js - JavaScript Framework for Node.js modeled after... by eagsalazar on Monday February 27, 2012 @06:09PM (#3641067)
Wow, a lot of people are really defensive about coffeescript.