[vtk-developers] PROPOSAL: Changing VTK's indentation style
Ben Boeckel
ben.boeckel at kitware.com
Wed Sep 9 09:43:27 EDT 2015
On Wed, Sep 09, 2015 at 09:22:37 -0400, David Lonie wrote:
> Well, if we're changing it anyway...
>
> I'd prefer
>
> void func()
> {
> if (...) {
> ...
> }
> else {
> ...
> }
> }
>
> Less wasted vertical space = more code on the screen, and it's a common
> style with great editor support. I've always been a fan of the Qt coding
> style.
>
> https://wiki.qt.io/Qt_Coding_Style
>
> That said, either would be fine with me.
I'm not too wedded to either (I personally prefer Allman for C++, but
K&R braces for C, Rust, JavaScript, and other "braced" languages[1], though
I've preferred using "} else {" to the style here[2]).
No matter what, can we please (continue to) enforce that braces are
*always* used even if the innards are a single line?
--Ben
[1]Rust, JS, and Java have style guidelines. C is usually because the
projects in C I work on are contributions and copying upstream is best.
[2]"Robin's egg blue is obviously better than turquoise" :P
More information about the vtk-developers
mailing list