When writing C, we've all heard people say "it doesn't hurt to use extra parenthesis" or "if in doubt, enclose it in parenthesis". Now, while both of these statements are basically correct in their applicable context, I personally feel that excessive use of parenthesis (especially where they're not needed) is indicative of an author who is uncertain of operator precedence, and frankly it drives me nuts. Personally, I place more importance on understanding and knowing operator precedence (even if it means keeping a little cheat-sheet pinned on your office wall) than on "feeling secure" by flooding/obscuring the code with just-in-case parenthesis. Am I being fussy?
Am I being fussy? no, you are being wrong. it is not just-in-case parenthesis it is avoid pesky little bugs parenthesis No bug is easier to overlook that a precedence bug and that is the case whether you know the precedences or not</i?. Erik
If a person knows a bug exists that can be resolved by using parenthesis, then use them. Arbitrarily sprinkling parenthesis throughout the code as a result of distrust of the compiler begs the question as to why you're using it in the first place.