[bind10-dev] style thingy wrt unit test code coverage

Evan Hunt each at isc.org
Wed Feb 24 18:24:05 UTC 2010


> The only time I ever do that is with early-exit goto statements, which I
> would probably use an exception for in almost every case in C++, so for
> me personally I am happy with always making conditionals 2 or more
> lines.

3 or more:

    if (foo) {
        bar();
    }

(I would be fine with bending that style requirement and omitting brackets
for if statements that only lead to a "break;" or "continue;".  But we
discussed it before and there seemed to be a general conensus that it was
better to have a simple and universal rule.)

> Agreed. I thought the first case (open squiggly-brace on a line by
> itself) was the rule?

It may be (I'm not sure), but I've seen inconsistent usage.  

> I don't care too much, but I prefer the second. I like lots of vertical
> space in my code though.

I don't; I'd rather deal with vertically-compressed text and 
scroll up and down through a file... but I can live with it.

-- 
Evan Hunt -- each at isc.org
Internet Systems Consortium, Inc.



More information about the bind10-dev mailing list