They're not synonyms; "and" is not a more readable version of "&&".
As Avdi Grimm says:
and and or, despite an apparent similarity to && and ||, have very different roles.
It's worth using "and" and "or", especially considering that && and || bind too tightly for some purposes. I try to avoid && and || unless I'm doing a specific boolean operation (e.g. x = foo || bar). Not for flow control, though.
As Avdi Grimm says: and and or, despite an apparent similarity to && and ||, have very different roles.
It's worth using "and" and "or", especially considering that && and || bind too tightly for some purposes. I try to avoid && and || unless I'm doing a specific boolean operation (e.g. x = foo || bar). Not for flow control, though.
If you really can't grok the logic, use parens.