3 ms·
This is mostly a matter of taste, but if the first example makes sense, the second example looks less clear, because, for someone quickly skimming through the c
by seren 7y ago
This is mostly a matter of taste, but if the first example makes sense, the second example looks less clear, because, for someone quickly skimming through the code, a variable which have a somewhat clear meaning "yes" (that could be improved) is replaced with a magic number who have no intrinsic meaning.
- TheSoftwareGuy 7y agoI agree. I’m also not a fan of doing `sizeof(typename)` as it can hide intent