Live data from Hacker News

Discourse ditches CoffeeScript

meta.discourse.org

11–20 of 84 posts

Re: Discourse ditches CoffeeScript

#11
post #9
post #7

Earlier quoted context omitted.

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

That article points out a design decision that the author disagrees with. It does not prove that CoffeeScript's scoping is broken.

The whole point of lexical scoping is that code in an inner scope can't mess with an outer scope's variables without meaning to. CoffeeScript doesn't achieve that. The same code in an inner scope means different things depending on whether the outer scope uses the same variable names. It's broken.

Re: Discourse ditches CoffeeScript

#12
post #11
post #9

Earlier quoted context omitted.

That article points out a design decision that the author disagrees with. It does not prove that CoffeeScript's scoping is broken.

The whole point of lexical scoping is that code in an inner scope can't mess with an outer scope's variables without meaning to. CoffeeScript doesn't achieve that. The same code in an inner scope means different things depending on whether the outer scope uses the same variable names. It's broken.

Lexical scoping is a term to classify languages. The 'point' is to make it easier to understand how a language behaves.

If you want to have var with the same name as something in an outer scope, there are ways to do it, specifically an IIFE.

Here's an article for you: https://github.com/raganwald/homoiconic/blob/master/2012/09/...

Re: Discourse ditches CoffeeScript

#13
post #7
post #5

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

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

There are Coffeescript forks that try to deal with issues like this. Here's one that takes a different approach on a bunch of 'em, including the scoping:

https://github.com/satyr/coco

Re: Discourse ditches CoffeeScript

#14
post #5

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

Indeed, the claim that JavaScript developers can't read CoffeeScript seems odd to me. As a novice JS developer, I could read CoffeeScript the first time I saw it and it took me a day to be fluent.

For me there's a noticeable productivity and enjoyment boost from the more terse syntax and that makes it more than worth it for me.

Re: Discourse ditches CoffeeScript

#15

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.

With noscript, I get bad layout but working pagination. Maybe that'll work on mobile safari?

Re: Discourse ditches CoffeeScript

#16
post #5

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

Indeed, the claim that JavaScript developers can't read CoffeeScript seems odd to me. As a novice JS developer, I could read CoffeeScript the first time I saw it and it took me a day to be fluent. For me there's a noticeable productivity and enjoyment boost from the more terse syntax and that makes it more than worth it for me.

There's not doubt it is readable (I'm quite a fan of the language too) - the problem is with writing it as a novice. This post highlights some of the issues with magic and whitespace:

http://meta.discourse.org/t/is-it-better-for-discourse-to-us...

Re: Discourse ditches CoffeeScript

#17
post #7
post #5

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

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

Of course, that link author suggests adopting a Python-like design instead, and Python is even more broken (Python has the most insanely awful scoping rules I've ever seen).

Really the problem is implicit declarations of any sort; they're great for one-liners, but they really suck when you're writing real software.

[But if you've gotta have 'em, please, at least don't copy Python...]

Re: Discourse ditches CoffeeScript

#19

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.

our mobile story sucks at the moment, we are dying for a mobile friendly skin at the bare minimum, contributions totally welcome.

you can get it to work on mobile safari in portrait if you zoom in / out ... but that just too hacky

Re: Discourse ditches CoffeeScript

#20
> 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).

maybe people should stop writing unindented ugly blocks in their non-indent-significant language then?

Post reply on HN