in reply to Re^3: perlstyle - Unclear wording
in thread perlstyle - Unclear wording
FWIW, I prefer to treat all paired delimiters the same (ie parens, brackets and braces all follow the same rules). When I break a single expression over multiple lines, I put the “connecting” ops at the front of the new line, instead of hanging them off them end of the previous one. And I use whichever set of boolean ops require the fewest parens (usually, the low-precedence ones) – in fact I always aim for the fewest paired delimiters possible, and only add optional ones deliberately when the result is too uniform and devoid of visual hooks. In this style, your example would be:
if ( $a1 == $a2 and $a3 == $a4 and ( $a5 == $a6 or $a7 == $a8 ) ) { # ... }
Makeshifts last the longest.
|
---|