News for hackers. Stuff that matters.
Re:Poll: Semicolons in JavaScript by felixge on Monday July 26, 2010 @07:21AM (#1547660)
Personally I think the Google Javascript Style Guide has it right:

> Relying on implicit insertion can cause subtle, hard to debug problems. Don't do it. You're better than that.

http://google-styleguide.googlecode.com/svn/trunk/javascript...

Re:Poll: Semicolons in JavaScript by felixge on Monday July 26, 2010 @09:23AM (#1547930)
FWIW: I would like to not use semicolons in JS. But the current "push" for that is IMHO a mix of ruby/python home sickness and "Let's do this because we are smart enough to do it right.". Both are terrible influences on style in any language.
Re:Poll: Semicolons in JavaScript by uptown on Monday July 26, 2010 @08:33AM (#1547811)
Interesting that you use Google as the example for always using semi-colons with JavaScript. When writing a code-example on a white-board during my Google interview, I was using semi-colons throughout my code. One of the things the interviewer asked was why I was using semi-colons ... implying that my code wasn't as clean as it could be. We talked about whether they were needed or not, but his preference seemed to be that they weren't really necessary, and that I shouldn't have been including them in my code.

I continue to use them in my code.

Re:Poll: Semicolons in JavaScript by yock on Monday July 26, 2010 @08:53AM (#1547854)
Perhaps your interviewer asked the question to see if you could justify them, thus gauging your understanding of how the language is parsed at runtime. The fact that the conversation continued may indicate that he or she wasn't convinced by your answer?
Re:Poll: Semicolons in JavaScript by uptown on Monday July 26, 2010 @09:20AM (#1547924)
Quite possible. It wasn't a turning-point in the interview or anything ... but a discussion that lasted longer than I would have expected given the topic.
Re:Poll: Semicolons in JavaScript by dazzawazza on Monday July 26, 2010 @09:15AM (#1547908)
I think this is more likely. When interviewing the point is to find out how someone is thinking not if they agree with a coding standard.
Re:Poll: Semicolons in JavaScript by mathgladiator on Monday July 26, 2010 @05:41PM (#1549397)
I once wrote a tool to beautify javascript from a mangled/compress form and in doing so learn that implicit insertion is absolute evil.

return { a : true }

and

return { a : true }

are different and can cause many problems.