On Sat, Dec 04, 2004 at 11:08:38PM +0300, Alexey Trofimenko wrote: > On Sat, 04 Dec 2004 11:03:03 -0600, Rod Adams <[EMAIL PROTECTED]> wrote: > > >Okay, this rant is more about the \s<\s than \s=\s. To me, it is easier > >to understand the grouping of line 1 than line 2 below: > > > >if( $a<$b && $c<$d ) {...} > >if( $a < $b && $c < $d ) {...} > > > >In line2, my mind has to stop and ask: is that "($a < $b) && ($c < $d)", > >or "$a < ($b && $c) < $d". It quickly comes to the right answer, but the > >question never comes up in the first line. If I wanted to use more > >parens for clarity, I'd use LISP. > > > > I've got used to write it as > if( $a < $b and $c < $d) {...} > already. if it could help.. :)
I agree with Rod - it is much more readable when there are no blanks around the < and there are blanks around the &&. Typing is not the problem as much as reading, however, I choose the spacing for readability when I type it, deciding what the base chunks are and putting blanks aound the base chunks but not within them. Having a few operators that require spacing will be an extra gotcha to consider in that process, so it will occassionably lead to syntax errors when I don't consider the special rule; but it will still lead to less readable code when I do remember the rule and leave the extra spaces. --