4 ms·
I agree with you here. Never happened to me, and I've never seen it happen. Another one is if(0 == some_thing). It seems clever and I try to use it, but if y
by jrockway 15y ago
I agree with you here. Never happened to me, and I've never seen it happen.
Another one is if(0 == some_thing). It seems clever and I try to use it, but if you write if(some_thing = 0), the compiler just warns you. So there's no real point in doing this.
- copper 15y agoIME, working with large groups of developers on a correspondingly large project where quality varies widely over different bits of code was the quickest way to learn to be grateful for such little syntactic annoyances that however helped catch bugs (or better, prevent them) quickly. The problem with compiler warnings is, unless you have a warning-free base build, they're difficult to see. And in turn, a warning-free build more or less depends on the very first developers to have turned the warning flags on while they were checking in stuff like mad trying to get someting to ship. So, yeah, I could claim that I don't too many such silly mistakes (and that might even be true), but I can both understand and approve of such coding standards.
- jrockway 15y agoLuckily, I've never worked on a non-open-source C project with anyone but myself. So my builds are warnings clean :)