[MERGE] Document code layout stuff

Martin Pool mbp at sourcefrog.net
Mon Sep 10 06:06:34 BST 2007


On 9/6/07, Alexander Belchenko <bialix at ukr.net> wrote:

> What about conditional statement?
>
> if (asdfghjkl != qwertyuio() or
>     mnbvcxzasdfgh == poiuytreweqlkjhgfgdfs()):
>     action
>
> Is right?

Yes, that's what these rules would tell you to do, and I think it is
reasonable.  In some ways it is unfortunate that the 'mnbv...'
"accidentally" lines up with the then-action.  Indenting continuations
by 8 characters avoids this - the mnbvc would be further to the right
- but people dislike that.

Like Harald, I would probably put the 'or' at the start of the
continued line to make it more obvious that it is a continuation.  Any
comments?

-- 
Martin



More information about the bazaar mailing list