|The stupid question is the question not asked|
Re: My coding guidelinesby mojotoad (Monsignor)
|on Nov 25, 2002 at 18:12 UTC||Need Help??|
Excellent list. It's not often you see style guidelines along with some informative prose as to the why of the guidelines.
I was surprised by this part (24):
Note that there is whitespace between ++ and -- and their operands, and between -> and its operands.
What's the consensus on this one? I've always liked snug ++/-- and dereferencing:
As opposed to:
For that matter, I've always made unary operators snug so that you can immediately find it's operand. This might be a holdout from C, but I do actually find the snug form more aesthetically pleasing.
On a somewhat visually related note, the arrow form of the left-associative operator works well with whitespace, however:
Whereas the equivalent comma operator is snug with the left operand.
Thanks again for the list,