News for hackers. Stuff that matters.
Re:The infernal semicolon (2012) by wallyhs on Thursday March 05, 2015 @10:01PM (#9155344)
I am - I think - looking at this from a safe-by-default perspective. Everyone will forget to include a semicolon eventually as you pointed out, but shouldn't your default strategy be the safest one?

Maybe I am missing something. There are obviously cases where missing semicolons do cause problems. Is there a situation in which adding a semicolon where allowed causes problems or increases the chances of introducing a bug in the future?

Re:The infernal semicolon (2012) by BrendanEich on Thursday March 05, 2015 @10:32PM (#9155435)
What's the default, though? If I try adding semicolons and over-do it, probably I'm ok. But I might make an empty statement while loop body -- an iloop. And being human, I will inevitably leave a crucial semicolon out.

I agree with the parent post. You can go wrong with either C-like or "NPM house" style. Linters are important, moreso in JS than in modern C and C++ (back to the future; I remember old C, which was wildly permissive).

Pick your poison, study it well and dose carefully.

Re:The infernal semicolon (2012) by wallyhs on Thursday March 05, 2015 @11:21PM (#9155574)
Now I know where my bias comes from: I did not consider going wrong with semicolons in C. Perhaps that is because C is my oldest friend. You are of course correct that the C style is not perfect either. Thanks for the reply.