4 ms·
I had to set lots of `visible?', `touch sensitive?', etc., flags based on Boolean expressions. I ended up with things like foo->vis = a || (b || !c && (..
by ralph 17y ago
I had to set lots of `visible?', `touch sensitive?', etc., flags based on Boolean expressions. I ended up with things like
foo->vis = a || (b || !c && (...)) && z;
Coding standards, and the arbiters at code review, insisted on a nested set of if-then-else statements comparing, e.g. a == TRUE, rather than just `a', with the many blocks being either foo->vis = TRUE or FALSE as appropriate.
This resulted in my two or three line statements turning into many more lines, which then gave them cause for concern because their style had swelled functions to where they thought they were getting too large!
Plus, the C compiler, one of IBM's, produced better POWER code for my line than theirs.
I finally got them to back down when I gave them a code sample in their style for study. Even when I pointed out it had an error they couldn't find it. I'd deliberately missed an else-block off an if-statement that had started a dozen lines before. This would mean foo->vis sometimes wasn't written to at all; impossible with my version.