Live data from Hacker News

Why I Don't Use CoffeeScript (2011)

oscargodson.com

21–23 of 23 posts

Re: Why I Don't Use CoffeeScript (2011)

#21
post #18

Earlier quoted context omitted.

I'm curious what issues you've run into with implicit returns. I haven't traced a single problem to implicit returns in many years of using languages that have them.

Not me so much as others - it's a very common problem I've seen when debugging other people's CoffeeScript code. CoffeeScript is a bit of a different situation than other languages since with other languages, it's the norm (i.e. Ruby) - however, with JavaScript, it is not something inherent in JS, so when people jump from JS to CoffeeScript, there is a disconnect.

Thanks for taking the time to respond, but I'm wondering what specific "common problem [you've] seen when debugging other people's CoffeeScript code", ie. what bug does implicit return commonly cause in their code?

Re: Why I Don't Use CoffeeScript (2011)

#22
post #3

After everything, CoffeeScript is for people who hate JavaScript. It isn't, though. It's for people who want to use a variant of JavaScript with less syntax sugar, which is exactly what the start of the post says. And the example of a single function does make it look like CoffeeScript is a waste of time. However, I love it when working with promises. What used to be: promiseFunc() .then(function(a) { return doSometh…

Actually, in this exact case the better Javascript example would be:

    promiseFunc().then(doSomething).then(doAnotherThing)

Re: Why I Don't Use CoffeeScript (2011)

#23
post #3

After everything, CoffeeScript is for people who hate JavaScript. It isn't, though. It's for people who want to use a variant of JavaScript with less syntax sugar, which is exactly what the start of the post says. And the example of a single function does make it look like CoffeeScript is a waste of time. However, I love it when working with promises. What used to be: promiseFunc() .then(function(a) { return doSometh…

Actually, in this exact case the better Javascript example would be: promiseFunc().then(doSomething).then(doAnotherThing)

Well, sure. This is what happens when I over simplify an example.
Post reply on HN