6 ms·
In fairness, I built a fairly large app using CoffeeScript and it still took a lot of brainpower to read it compared to JS. All the typical complaints about amb
by andrewingram 11y ago
In fairness, I built a fairly large app using CoffeeScript and it still took a lot of brainpower to read it compared to JS. All the typical complaints about ambiguous-looking syntax match my experiences exactly.
I ended up with a general workflow of having my Coffeescript source and the generated JavaScript sitting side-by-side so I could check that the output was what I was expecting. I've only had the urge to do that with ES6 and Babel a couple of times.
- Lazare 11y agoI built a pretty large app using Coffeescript, and I was about to say that I disagreed, and never felt like I needed at the generated output, but... ...now that you say that, I did end up going to the Coffeescript REPL on their website to test a bit of syntax a fair number times. I feel like a got used to it pretty fast, but I agree, a big chunk of Coffeescript's learning curve is getting past it's ambiguity, and there were some features I expressly avoided just because they were too confusing. Eg, I could never remember the difference between 'in' and 'of' in CS, so I just used underscore's equivalents. And then there were the comprehensions, and the weird scoping rules, and...yeah. I'll be honest, switching from CS to a modern Babel/ES6+ configuration, I thought I'd really miss CS, but I really haven't. I maintain that if you know CS, good CS code is easy to understand, but good CS code takes way too much work to write. :)
- xiaoma 11y agoInteresting. Comprehensions are probably the main thing I miss. I liked the automatic returns and the @ shorthand, but whenever I find myself using Python for whatever odd reason, having comprehensions again is like encountering a long lost friend.
- klibertp 11y agoI wrote a couple of (simple) apps in LiveScript, which is similar to CoffeeScript, but is still way ahead of ES6 in terms of features[1]. I had to look at the generated source only once: when I was debugging and ultimately fixing a bug in the compiler. That's expected: had my C compiler had a bug, I'd have to look at asm output, too. Normally, pre-source maps, I'd also look at generated JS when debugging in the browser, but this is no longer the case. Other than the mentioned compiler bug I didn't have to look at the generated JS even once in my 2-3 years of using LiveScript. I think a good question to ask would be why did you have to look at the generated source. What did that give you, and what could replace it? Is looking at the generated source the most efficient way to achieve your goals? [1] The "killer feature" of LiveScript, for me, is its support for functional programming on par with support for OO. It reminds me of Scala or F# in that regard.