Live data from Hacker News

Announcing CoffeeScript 2

coffeescript.org

211–220 of 220 posts

Re: Announcing CoffeeScript 2

#211

CoffeeScript is still very relevant for me. I have two medium-sized Ember projects written in CoffeeScript (and Emblem and Sass--the original, indented variety, thank you very much). I have been looking at React (will probably skip due to the patent license) and Vue, but cannot imagine going back to semicolons and (excessive) curly braces and parens. If you married CoffeeScript just out of convenience (being able to…

Might I suggest trying out JavaScript Standard Style [0]? It has editor plugins and a CLI tool for linting.

You can write JavaScript just fine without semicolons. I used to be in the same camp, but Feross eventually convinced me to try dropping em. Despite being cautious and a bit skeptical, I tried it out in a few projects by removing all semicolons with a search and replace. In every single case, I encountered zero issues.

[0] https://standardjs.com

Re: Announcing CoffeeScript 2

#212

Earlier quoted context omitted.

I like consistency. And I am paranoid. When I write JS, I always include semicolons. When I write CS, it is a non-issue.

It must be said though that CS has its own headscratchers in terms of parsing, if you choose to leave off all optional punctuation.

I agree. With great power comes great responsibility. Just because you can leave out all punctuation with CoffeeScript, it doesn't mean you should.

Re: Announcing CoffeeScript 2

#214

I never understood the need for CoffeeScript. I especially don't understand why someone would want it now. Compilation of JavaScript is a terrible idea. I have worked with loads of different compile to JS languages. The compile step is a huge pain. The language has to be much much much better than JS for it to be worthwhile. I think that even JSX or TypeScript don't cut it... Close but still not worth the hassle! I u…

Do you use any modern JS tools? Webpack? Require or import? Babel? In my experience any es6 tooling is much of a bigger pain compared to coffeescript tooling.

I'm full stack so when I saw the monstrosity of the React ecosystem rear its ugly head a couple of years ago, I retreated to back-end work mostly (I'm waiting out the storm).

For my side projects I currently use the Polymer framework so I don't need a bundler, a compile step or 100 pointless dependencies. The only compilation that happens is when I vulcanize the front end for production (purely as an optimization). No transpiling happens when debugging and this saves me so much time and frustratiom - I just cannot bring myself to use React or TypeScript.

Re: Announcing CoffeeScript 2

#215

Earlier quoted context omitted.

Do you use any modern JS tools? Webpack? Require or import? Babel? In my experience any es6 tooling is much of a bigger pain compared to coffeescript tooling.

I'm full stack so when I saw the monstrosity of the React ecosystem rear its ugly head a couple of years ago, I retreated to back-end work mostly (I'm waiting out the storm). For my side projects I currently use the Polymer framework so I don't need a bundler, a compile step or 100 pointless dependencies. The only compilation that happens is when I vulcanize the front end for production (purely as an optimization). N…

That is kinda the point. CoffeeScript pipeline is literally nothing compared to modern a frontend pipeline complexity. And it brings tons of goodies. That is why people use it, even now.

Re: Announcing CoffeeScript 2

#216

CoffeeScript is still very relevant for me. I have two medium-sized Ember projects written in CoffeeScript (and Emblem and Sass--the original, indented variety, thank you very much). I have been looking at React (will probably skip due to the patent license) and Vue, but cannot imagine going back to semicolons and (excessive) curly braces and parens. If you married CoffeeScript just out of convenience (being able to…

Maybe it's just me, but I can't imagine dealing with scope without those little curly braces. They give a definitive beginning and end I can see, rather than trust my indents are correct. But maybe I just didn't give Coffeescript enough time to get used to it.

Re: Announcing CoffeeScript 2

#217

Earlier quoted context omitted.

I like consistency. And I am paranoid. When I write JS, I always include semicolons. When I write CS, it is a non-issue.

> And I am paranoid You should write tests when building a project in a dynamically typed language to alleviate some paranoia anyway. As long as you have decent test coverage and use a decent linter/formatter such as StandardJS[0] or prettier[1], you'll be fine. [0] https://standardjs.com/ [1] https://github.com/prettier/prettier

Yeah, if your linter/build tool can't handle Javascript that doesn't have semicolons, it should be considered fundamentally broken and/or incomplete.

So the question to me becomes, if the build tool doesn't correctly parse the JS that's lacking semicolons, should you really trust that build tool with the rest of your code? You already know at that point that it doesn't handle your otherwise-valid semicolonless JS correctly.

Re: Announcing CoffeeScript 2

#218
post #189

Earlier quoted context omitted.

CS breaks the ternary ?: operator which is a big headache for me.

Everything is an expression. Including if statements. There is no need of such syntax abominations.

Sure, but other coffee operations like x||=5 are also abominations. Brevity and purity are often at odds and the choices made by a language can be arbitrary.

Re: Announcing CoffeeScript 2

#219
post #103

I respect CoffeeScript for what it did and playing a part in making Javascript and its ecosystem better. That said, for a new development, is there any reason to use it over ES6? If you don't like the current Javascript, Cofeescript isn't going to convince you (Elm, Purescript, Scala.JS etc. might). The only direct value is see in this version is as an upgrade target for existing codebases.

> That said, for a new development, is there any reason to use it over ES6? Obviously your mileage may wary. I think, the biggest reason is a time boost. - Less noisy code (no braces etc) that is easier to scan - No time wasted on flirting with new ESXXXy stuff - There is no callback hell to deal with - Writing React code is sweet. As previously noted: http://rapin.com/blog/2015/02/03/reactjs-with-coffeescript/ - Les…

+ very lightweight dependency to pull in, in contrast to installing the operatingsystem-size babel (tip: there´s also buble)

Re: Announcing CoffeeScript 2

#220

Earlier quoted context omitted.

We did. And had to "decaffeinate" everything a few months later because it is hell to work with implicit returns, objects without brackets, no spread operator, significant whitespace, no variable declaration keyword... It really is a matter of taste, but the large majority of us didn't like it. It is pretty, but I felt like fighting against the language all the time (implicitly returning an bracketless object is not…

Yes, CoffeeScript is chaos. I've found that CS's biggest proponents can be heard to say "Let's just replace it with a custom thing I'll build this weekend" much more frequently than normal. Surely this is coincidental. ;) The old joke was that Perl is a write-only language, and CoffeeScript et al are essentially thought experiments for how deep into the write-only abyss people are willing to plunge as a non-joke. It'…

Speak for yourself! :)
Post reply on HN