[vtk-developers] Use of std::cout in tests

Marcus D. Hanwell marcus.hanwell at kitware.com
Wed Sep 19 16:40:35 EDT 2012


On Wed, Sep 19, 2012 at 4:06 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Folks,
>
> There has been some recent turmoil regarding the use of std::cout in tests
> versus cout. The current style guidelines recommend the latter.
> First, why is this even an issue. Second, can we amend the style to allow
> std::cout? Much c++ code I see uses std::cout.
>
> I'd much rather spend time improving VTK'sl ow coverage that argue over what
> seems to be a non-issue.
>
I guess I was the source of the aforementioned turmoil. I think it is
important to stick to a common style, and actively changing test code
to not match the style seems bad to me. I don't see the point in fully
specifying std::cout when we have brought it into the global
namespace, but if there is a strong feeling we should then my point
was simply that we should specify that is the preferred style from
this point forward (or that either is acceptable).

If we all start modifying the VTK coding standards then our code will
be far less consistent, and harder to understand due to using several
styles. If there is general agreement on relaxing some parts of the
style I really don't feel very strongly, but I think it should be done
deliberately rather than on an ad-hoc basis.

Where would you draw the line if this should be relaxed? Could
standard indentation be used instead of the special VTK indentation in
classes I author? I am sure we don't want to allow that, but it does
require some definition on what is strictly required and what is
advised/optional.

Marcus



More information about the vtk-developers mailing list