← Back to team overview

cuneiform team mailing list archive

Re: Code style discussion

 

On Fri, 2009-01-30 at 15:44 +0200, Jussi Pakkanen wrote:

> - no space between if/while/etc and parenthesis, one space after
> comma/semicolon, like this:
> 
> for(i=0; i<value; i++)

Actually I find

for (i = 0; i < value; i++) {
    blah(par1);
}

a bit nicer and easier to read (and even better if you have huge
if-clause like !(foo && (bar <= 1) || ((a << 3) && (b & 0xff))) as
opposed to !(foo&&(bar<=1)||((a<<3)&&(b&0xff))) ), although I probably
have no right to vote as I didn't contribute a single patch :-(

> (If you have a variable width font, or something breaks during
> transmission, "par4" should be exactly below "par1".)

I have "Monospace 12" set in Evo, but I've got "par4" offset by 1 space
to the right. Did you actually meant the following?

foo(par1, par2, par3,
    par4, par5);

Otherwise, I'd say that I like it better when offset by 1 space.

Everything else is fine with me.
 
-- 
Sincerely yours,
Yury V. Zaytsev




Follow ups

References