TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Discourse ditches CoffeeScript

90 pointsby fernandezpabloabout 12 years ago

14 comments

ansmanabout 12 years ago
If you understand programming (there is a difference between knowing how to program and understanding, a lot of people lack the latter) there is absolutely no difficulty learning CS if you know JS.<p>I've been coding CS for over a year now and I like it, I've never found it hard to debug and it's just easier to read.
评论 #5268462 未加载
评论 #5268279 未加载
评论 #5268145 未加载
ricardobeatabout 12 years ago
Did they? I can't get to the end of the thread 'cause their infinite scroll thing is not working on mobile safari. Looks like they should focus on coding instead.
评论 #5268354 未加载
评论 #5268302 未加载
评论 #5268957 未加载
raganwaldabout 12 years ago
I find this a curious debate to have so early in Discourse's life. There doesn't appear to be a pain point, so it's mostly speculation. If this happens, then that consequence, but if this happens, then that other consequence...<p>I would stick with CoffeeScript until it becomes painful. There is relatively little downside risk. If and when you have great people refusing to contribute code because they hate CoffeeScript, well, that'll be a pain point. On the other hand, what if you get a bunch of other people who like contributing code because they can do it in CoffeeScript?<p>Are there meaningful statistics collected? Until there are, or at least a weighty collection of anecdotes, I'm sure there's something more important to worry about.
评论 #5269085 未加载
评论 #5268813 未加载
评论 #5269061 未加载
评论 #5269171 未加载
jtchangabout 12 years ago
Am I the only one that has trouble parsing this CoffeeScript? I thought the syntax was suppose to be cleaner than plain javascript:<p>MyApp.president = Ember.Object.create fullName: (-&#62; @get('firstName') + ' ' + @get('lastName') ).property('firstName', 'lastName')<p>How the hell am I suppose to read that?
评论 #5268460 未加载
评论 #5268606 未加载
评论 #5268481 未加载
adamesqueabout 12 years ago
If I've understood correctly, the most compelling argument (or at least the most seemingly objective one) is that CoffeeScript conflicts with planned features of ES6+, meaning that there is a risk that large CoffeeScript projects will be locked into the ES5 feature set.<p>Since Discourse is planning on being around long after ES6 becomes widely available, it was a winning argument.<p><a href="http://meta.discourse.org/t/is-it-better-for-discourse-to-use-javascript-or-coffeescript/3153/19" rel="nofollow">http://meta.discourse.org/t/is-it-better-for-discourse-to-us...</a><p>Also, one of the big reasons the Discourse devs liked CoffeeScript is because it makes it hard to commit common JS errors. Building JSHint into their workflow can help bring this protection back.
评论 #5268557 未加载
zalewabout 12 years ago
&#62; CoffeeScript has significant whitespace. So instant no. It makes it a pain in the butt to parse. It's annoying. Most people (except for Python developers) don't like it. Due to being difficult to parse, you will have problems when you try to refactor. Not to mention the problems of re-indenting everything when you have really long and ugly blocks you want to clean up (happens).<p>maybe people should stop writing unindented ugly blocks in their non-indent-significant language then?
评论 #5268423 未加载
fourstarabout 12 years ago
Is it just me or is anyone else finding it weird viewing a thread on Discourse from HN? It's basically the same thing IMO (although obviously this is a Discourse site announcement). I just hope this doesn't become a "thing" as it's just essentially same as linking to a forum post.
评论 #5268114 未加载
评论 #5268210 未加载
smnrchrdsabout 12 years ago
History repeats itself. This topic reminds me of QWERTY vs. Dvorak. People continue using something because everyone else is and they always have; not because it's the optimal option.
评论 #5269438 未加载
benaiahabout 12 years ago
I supported the switch to JavaScript, despite being an avid Coffeescript developer. Why? Because any CoffeeScript developer worth their salt already knows JavaScript, and can translate the JS to CS and back quite simply (admittedly, it's not as nice as hand-written CS, and the compilation loses comments, but I still prefer it to writing the JS by hand if I'm doing a bunch). But many, many JS developers don't know CS, or don't like it.<p>Now, this only affects the first official client. I imagine that there will be a CS port of the JS client as soon as the switch is made. That's the great thing about using a client to a REST API - you can have several different front-ends. If this was to be the only client, I'm not sure if I would support using JS over CS.<p>(btw, I'm @benaiah on meta.discourse.org - I'm in the referenced thread)
kmfabout 12 years ago
I think the advantage of this project being open source becomes really clear in situations like this: I'd imagine js2coffee[1] will cover most of their bases, but in the situation that it <i>doesn't</i>, they have a (pretty active) Github community to fall back on for the finicky bits of conversion.<p>[1]: <a href="http://js2coffee.org/" rel="nofollow">http://js2coffee.org/</a>
评论 #5268885 未加载
nigglerabout 12 years ago
I would discuss how I feel about coffeescript and interstitial white space sensitivity and the ilk, but I'll point to a blog post which expresses most of my views neatly: <a href="http://blog.izs.me/post/10213512387/javascript-is-not-web-assembly" rel="nofollow">http://blog.izs.me/post/10213512387/javascript-is-not-web-as...</a>
Herbert2about 12 years ago
I've found that CoffeeScript is great at standardizing the various styles of coding JavaScript that exist in an office.
itsbitsabout 12 years ago
good..now i will look into Discourse...
camusabout 12 years ago
I developped a little layout library ( work in progress ) which is a port of a flash lib. and frankly coffeescript made it really easy and made me wrote far less code that pure javascript.<p>One can write readable code with Coffeescript , i use parenthesis in big scripts because it is more readable , and i dont use classes where not appropriate.<p>CS helped me write better javascript without the badparts so i dont need to be a human compilator and fix javascript each time i write it. I should not have to.<p><a href="http://mparaiso.github.com/Coordinates.js/" rel="nofollow">http://mparaiso.github.com/Coordinates.js/</a><p>It is not for everyone , but significant white spaces are not a problem if one is used to indent his code properly. I tried typescript too , which is good, but i found coffeescript more expressive. The truth is , i enjoy writing CS , i dont writing JS.