??? 07/03/07 00:49 Read: times |
#141432 - re: As I said Responding to: ???'s previous message |
Chris Kelly said:
Erik Malund said:
Why on earth bother remembering "operator precedencees" you do not need to know if you use parantheses. 1. Because you might change jobs, and your new employer's codebase might not be "parenthesised". 2. Because you might have to work with 3rd party code that is not "parenthesised". Like porting/fixing embedded Linux for example. 3. Your company might have to complete a project started by others, and guess what? The existing codebase is not "parenthesised". If your work environment is so insulated that you only ever have to deal with "parenthesised code" (now and always) then it's ok to forget the rules of operator precedence. When I see someone's unparenthesee-ized code and can't figure out what they're trying to do, I reach for my copy of "Practical C Programming" and look it up. That way I'm sure I know what the code actually does, as opposed to what the programmer thought he was trying to do ... I've noticed a correlation between quality of code comments and the usage (or lack thereof) of parentheses. I just want to understand my code in six weeks ... -a |