Live data from Hacker News

Discourse ditches CoffeeScript

meta.discourse.org

61–70 of 84 posts

Re: Discourse ditches CoffeeScript

#61
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.

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.

(btw, I'm @benaiah on meta.discourse.org - I'm in the referenced thread)

Re: Discourse ditches CoffeeScript

#62

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... 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…

Yea, if they really hate one or the other, there are converting tools like http://js2coffee.org/

Re: Discourse ditches CoffeeScript

#63
post #7

Earlier quoted context omitted.

CoffeeScript's scoping is broken. http://lucumr.pocoo.org/2011/12/22/implicit-scoping-in-coffe...

Nope. CoffeeScript's scoping is working the way it's supposed to be ;) It's actually a funny thing -- out of all of the folks who actually have tried playing around with CoffeeScript in earnest (participated in issues or the mailing list), I can count on the fingers of one hand the number who have actually disliked working with the scoping semantics. There's a far larger number of folks who like to worry about the sc…

In other words, No True CoffeeScript User dislikes the scoping rules…

Re: Discourse ditches CoffeeScript

#64
post #38
post #26

Am I the only one that has trouble parsing this CoffeeScript? I thought the syntax was suppose to be cleaner than plain javascript: MyApp.president = Ember.Object.create fullName: (-> @get('firstName') + ' ' + @get('lastName') ).property('firstName', 'lastName') How the hell am I suppose to read that?

If you were to read the equivalent javascript as a one liner it would be hard to read too. Probably more so. Really, all you are pointing out is that you can write shitty code in any language. No language protects you. If you write beautiful javascript, you will write beautiful coffeescript and it will be 20-60% smaller. Reading less lines is less reading, this helps me.

Nonsense. The equivalent JavaScript is clearer, albeit more verbose.

Re: Discourse ditches CoffeeScript

#65
post #57

Earlier quoted context omitted.

Seems like a very narrow mindset. Why would they assume coffeescript won't adapt to ES6? CoffeeScript compiler can change quickly while maintaining backwards compatibility. ES6 standards move at a snails pace. There's other perfectly valid reasons to use pure-JS on a large open source project, but the ES6 thing is a red herring IMHO.

What makes you think CoffeeScript can target ES6 while maintaining backwards compatibility? Did you read the discussion? Wycats makes a very good argument for the opposite position.

Yep, I did read the discussion. I think wycats brings up a perfectly good concern, but the key point which he misses is that there is time, and CoffeeScript can change to fix what I think is a very solvable issue.

The current estimate for ES6 support in browsers is 2014. CoffeeScript only hit 1.0 about 2 years ago, and has had 3 minor point releases since then.

For me it's not hard to imagine a CoffeeScript 2.0 release at some point next year that targets ES6. It could make a few syntax changes, and ship with some helper tools (or a 3rd would create it) to detect possibilities in your previous code and tell you where you need to tweak to make it compatible.

Re: Discourse ditches CoffeeScript

#66

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.

There's no proof Dvorak is any better. http://www.reason.com/news/show/29944.html

Re: Discourse ditches CoffeeScript

#67
post #38

Earlier quoted context omitted.

If you were to read the equivalent javascript as a one liner it would be hard to read too. Probably more so. Really, all you are pointing out is that you can write shitty code in any language. No language protects you. If you write beautiful javascript, you will write beautiful coffeescript and it will be 20-60% smaller. Reading less lines is less reading, this helps me.

Nonsense. The equivalent JavaScript is clearer, albeit more verbose.

I think that's the point, verbose is usually "containing more words than necessary"

Re: Discourse ditches CoffeeScript

#68
post #66

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.

There's no proof Dvorak is any better. http://www.reason.com/news/show/29944.html

Wrong.

"First, Dvorak is very good at keeping fingers on home row - 71% of keystrokes land there (compare this with 34% for QWERTY). This alone is worth the price of admission. Dvorak bottom row usage is very low at 9% (15% for QWERTY). Dvorak favours the right hand by 14% (QWERTY favours left by 15%). Dvorak has more uniform finger usage and makes greater use of the pinky (18% vs QWERTY's 10%). The cumulative run statistics illustrate Dvorak's strength in alternating hands. 62% of successive keystrokes on Dvorak do not use the same hand (rh(0)) and 88% of adjacent keystrokes use the same hand at most once (rh(1)). In contrast, with QWERTY only 51% of successive keystrokes do not use the same hand and only 76% use the same hand at most once. QWERTY forces the typist to use the same hand repeatedly, which limits the amount of rest and increases effort. Dvorak's preference for the use of the right-hand give it longer right hand runs with only 47% of keystrokes that use the right hand being followed by use of the left hand (61% for QWERTY). The corresponding statistic for the left hand is reversed, with Dvorak at 76% and QWERTY at 42%."[1]

The authors of the Reason Magazine article from 1996 that you linked to stated that "Ergonomic studies also confirm that the advantages of Dvorak are either small or nonexistent." But the authors cited only one nameless, undated study. This promotion of QWERTY isn't surprising seeing as how Reason Magazine is written by ideologues whose goals include the promotion of the idea that the invisible hand of the market is never wrong.

You should consider getting your information from specialists who are active researchers rather than the writings of non-specialists from previous decades.

[1] http://mkweb.bcgsc.ca/carpalx/?dvorak

Re: Discourse ditches CoffeeScript

#69
post #66

Earlier quoted context omitted.

There's no proof Dvorak is any better. http://www.reason.com/news/show/29944.html

Wrong. "First, Dvorak is very good at keeping fingers on home row - 71% of keystrokes land there (compare this with 34% for QWERTY). This alone is worth the price of admission. Dvorak bottom row usage is very low at 9% (15% for QWERTY). Dvorak favours the right hand by 14% (QWERTY favours left by 15%). Dvorak has more uniform finger usage and makes greater use of the pinky (18% vs QWERTY's 10%). The cumulative run st…

You should take a look at the research behind Colemak (and a less known layout named Workman), to see that Dvorak is a subpar layout, with misguided reasoning and poor optimisations.

Re: Discourse ditches CoffeeScript

#70
post #38

Earlier quoted context omitted.

If you were to read the equivalent javascript as a one liner it would be hard to read too. Probably more so. Really, all you are pointing out is that you can write shitty code in any language. No language protects you. If you write beautiful javascript, you will write beautiful coffeescript and it will be 20-60% smaller. Reading less lines is less reading, this helps me.

Nonsense. The equivalent JavaScript is clearer, albeit more verbose.

[deleted]
Post reply on HN