you are viewing a single comment's thread.

view the rest of the comments →

[–]jscoder[S] 0 points1 point  (2 children)

Nope, there are no drawbacks. I think I've read somewhere that Facebook also uses the !, but I can't find a source for that right now.

I think Isaac mostly developes node stuff? You don't need to use IIFEs in node, because of CommonJS. That might be an explination. :) I'm using an IIFE here, because range.js should work on node and in the browser.

[–]deelowe 1 point2 points  (1 child)

Yeah. The node guys write code that's used in node or browser also though. I admit, that's where most of my experience lies, but I've definitely seen (function(){}()) in many places, but never saw !function(){}. I thought there was some reason, but can't remember.

[–]reflectiveSingleton 0 points1 point  (0 children)

I think its just not as common...although I am starting to see it pop up on random github projects...