in reply to Conditional style (if, &&) query
expr and b(); is good when the expr is more significant than the call to b(), or when you're emulating a switch statement.
b() if expr; is good when the call to b() is more significant than the expr, such as b() if $DEBUG;.
if ( expr ) { b(); } is good because it has the clearest structure, especially for people familiar with other languages.
|
|---|