Slashdot Mirror


User: codehouzi

codehouzi's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Re:Stupid Micro-optimizations on Optimizations - Programmer vs. Compiler? · · Score: 1

    I don't know. if (!ptr) is an incredibly common idiom in C. So, for seasoned C programmers, 'if (!ptr)' is pretty much just as readable as if (ptr == NULL).

    In fact, when I maintain code, seeing something like if (ptr == NULL), usually makes me a little nervous. Not because if (ptr == NULL) itself is bad, but because it usaully indicates that who ever wrote the code is either new to coding in C, or minimally just doesn't code in C too often. If either of these are true, this usually means the code has an increased number of weird and/or anonying bugs.