in reply to My coding 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:
++$wolverines; $rabbits--; $wombat->move(); $turtle = $menagerie->;
As opposed to:
++ $wolverines; $rabbits --; $wombat -> move(); $turtle = $menagerie -> ;
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:
%myhash = ( lizard => 'gecko' );
Whereas the equivalent comma operator is snug with the left operand.
Thanks again for the list,