News for hackers. Stuff that matters.
Re:Anti-if: The Missing Patterns by mercer on Friday June 10, 2016 @02:45AM (#11874667)
Interesting. I often (but not always) prefer the if (!condition) {} at the top because I see it as 'bailing out' of the function if conditions are not met.
Re:Anti-if: The Missing Patterns by michaelmior on Sunday June 12, 2016 @04:10PM (#11890002)
If I'm doing an early return, I usually don't put the rest of the function inside the else case since I feel it creates an unnecessary level of indentation.