in reply to Re: A Question of style.
in thread A Question of style.
I don't peronsally mind if a block is on one line, as long as it's short. if (condition) { $foo=0; $bar++; } is perfectly fine. I mean consistency within a file, given the context. If you always put short blocks on one line, great. If you do something likeif (condition) { code; other_code; } else { bork; } if (condition_2) { foo; } else { i_think_you_get_what_i_mean(); }
then I consider it to be inconsistent. And when I find inconsistent indentation it implies to me that your thinking isn't clear. This may or may not be the case -- it's more of an impression I get than an absolute rule.if (condition) { $foo=0; $bar++ } # more code... if (other_condition) { $foo++; }
|
|---|