[haiku-development] Re: Clarifying multi-line if-clause rule

  • From: Gabriele Biffi <mlist@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 08 Feb 2011 11:50:12 +0100

Oliver Tappe wrote:

From my POV, if readability is the goal, I'd go with the brace style we use
for 'case' already:

if (some condition which does not fit in one line
     &&  extends to the next line)
{
     do_something();
}

That's my preferred solution as well, because it visually separates the condition from the statements. For some time I've played with

if (some condition which does not fit in one line
  &&  extends to the next line)
     do_something();

but now I regret it...

Regards,

Gabriele

Other related posts: