News for hackers. Stuff that matters.
Re:Announcing CoffeeScript 2 by methyl on Monday September 18, 2017 @01:34PM (#15277832)
> cannot imagine going back to semicolons

Actually, Javascript does not require semicolons to be present. If you skip them, the only edge-case is when you try to start your line with `[` or `(`. In that case, you can prefix the line with `;`.

Re:Announcing CoffeeScript 2 by ralmidani on Monday September 18, 2017 @01:42PM (#15277909)
I like consistency. And I am paranoid. When I write JS, I always include semicolons. When I write CS, it is a non-issue.
Re:Announcing CoffeeScript 2 by pramodliv1 on Monday September 18, 2017 @03:34PM (#15278803)
> 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

Re:Announcing CoffeeScript 2 by sli on Thursday September 21, 2017 @10:35AM (#15303821)
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 by acjohnson55 on Monday September 18, 2017 @09:57PM (#15281236)
It must be said though that CS has its own headscratchers in terms of parsing, if you choose to leave off all optional punctuation.
Re:Announcing CoffeeScript 2 by ralmidani on Wednesday September 20, 2017 @09:08AM (#15293298)
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 by akvadrako on Monday September 18, 2017 @02:25PM (#15278257)
I consistently don't use semicolons in JS. It's just noise.
Re:Announcing CoffeeScript 2 by jdmichal on Monday September 18, 2017 @02:33PM (#15278317)
Omitting semicolons breaks the "delete a line in isolation" rule, unless you begin the line with a semicolon instead. Which is even noiser than just having them at the end of the line, where they are unconsciously glossed over by anyone who's ever worked in a language with C-derived syntax.
Re:Announcing CoffeeScript 2 by RussianCow on Monday September 18, 2017 @02:41PM (#15278374)
I hear this a lot, but in ~4 years writing JavaScript without semicolons, I've had to do this maybe two or three times. I just don't feel like starting a line with [ or ( is very common, to the point that it's a complete non-issue to me.
Re:Announcing CoffeeScript 2 by tga on Tuesday September 19, 2017 @01:01AM (#15281921)
In the majority of cases you can't "delete a line in isolation", because it's part of a program. You have to look around and understand what the impact of deleting that line will be -- and modify nearby lines as necessary.
Re:Announcing CoffeeScript 2 by vanderZwan on Monday September 18, 2017 @03:47PM (#15278901)
I have my VSC set up to automatically format and insert semicolons when I save. Saves a lot of hassle.
Re:Announcing CoffeeScript 2 by boubiyeah on Monday September 18, 2017 @04:03PM (#15279030)
And with Typescript (or a linter, I guess) you would get a nice red line on that 1 out of a million line where a ; is needed.

; are eyesores to an already fairly technical debt heavy/bloated language.

Re:Announcing CoffeeScript 2 by Bahamut on Monday September 18, 2017 @02:40PM (#15278369)
There is a nasty edge case if you concatenate scripts and use an IIFE in a script
Re:Announcing CoffeeScript 2 by rattray on Tuesday September 19, 2017 @03:55AM (#15282583)
There's more than just those edge-cases, but the others are rare in practice. They include +, -, `, < (JSX), ::, / (regex) and maybe a few others.

There's also some odd ASI issues within class bodies.

https://github.com/prettier/prettier/pull/1129 can be a useful reference (and tool!)

Re:Announcing CoffeeScript 2 by the_gipsy on Tuesday September 19, 2017 @07:49AM (#15283741)
also `{` after a return without value