News for hackers. Stuff that matters.
Re:Of parser-fetishists and semi-colons by tptacek on Monday April 16, 2012 @01:55PM (#3848493)
Oh for fuck's sake.
Re:Of parser-fetishists and semi-colons by chris_wot on Monday April 16, 2012 @07:24PM (#3850049)
I understand the frustration with this comment, but the clincher for me on the whole anti semi-colon crowd was at this article:

http://www.wordsbyf.at/2011/10/31/i-dont-write-javascript/

He says he doesn't use semicolons, except that it caused issues for those who concatenation scripts so he adds a semicolon to the end of the js file. But, lo! This causes issues for those who use the following pattern:

  (function() {
     // Le code
  })()
This has the potential to cause syntax errors when you execute two anonymous functions after each other. Instead of adding a semi-colon to the end, he "works around" the issue by abusing JavaScript like so:

  !function() {
    // Le code
  }()
For fucks sake indeed!
Re:Of parser-fetishists and semi-colons by tptacek on Tuesday April 17, 2012 @12:19AM (#3851083)

  (function() {
     // Le code
  })()

  !function() {
    // Le code
  }()
YOU'RE RIGHT. I'M HORRIFIED.