News for hackers. Stuff that matters.
Re:How to: code JavaScript using Twitter bootstrap best prac... by cocoflunchy on Monday May 05, 2014 @08:21AM (#7698089)
There's a good discussion over here: https://github.com/airbnb/javascript/issues/44
Re:How to: code JavaScript using Twitter bootstrap best prac... by pjc50 on Monday May 05, 2014 @08:28AM (#7698128)
Oh god. Javascript's optional semicolon really has inflicted a lot of damage, hasn't it?
Re:How to: code JavaScript using Twitter bootstrap best prac... by bshimmin on Monday May 05, 2014 @08:41AM (#7698184)
Horrible, isn't it? Baffling, quasi-random punctuation inserted to prevent random errors caused by poor design choices intended to make programmers' lives easier.
Re:How to: code JavaScript using Twitter bootstrap best prac... by mattmanser on Monday May 05, 2014 @08:35AM (#7698159)
I remember when I used to rave on at my colleagues that it was amazing back in 2005.

How wrong I was.

Re:How to: code JavaScript using Twitter bootstrap best prac... by bpicolo on Monday May 05, 2014 @01:12PM (#7699704)
You lose the return value over (function(){})(). That's an awful recommendation.
Re:How to: code JavaScript using Twitter bootstrap best prac... by _harry on Thursday May 08, 2014 @12:12PM (#7716049)
Yup! We only recommend !function(){}(); for a module where you just need your function to run. If you rely on the return value use (function(){})(); or (function(){}()); (more on this: https://github.com/airbnb/javascript/issues/21)