<div dir="ltr"><div>+1  It would be nice to have a format that doesn't require twiddling with the editor(s) so much.  Having said that, I prefer that we do what Brad suggested and use clang-format.  I've used it before on a project in grad school and it was nice not having to worry about whitespace while coding since I could just run a command to fix it at the end.<br><br></div>Shawn<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 9:43 AM, Ben Boeckel <span dir="ltr"><<a href="mailto:ben.boeckel@kitware.com" target="_blank">ben.boeckel@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Sep 09, 2015 at 09:22:37 -0400, David Lonie wrote:<br>
> Well, if we're changing it anyway...<br>
><br>
> I'd prefer<br>
><br>
> void func()<br>
> {<br>
>   if (...) {<br>
>     ...<br>
>   }<br>
>   else {<br>
>     ...<br>
>   }<br>
> }<br>
><br>
> Less wasted vertical space = more code on the screen, and it's a common<br>
> style with great editor support. I've always been a fan of the Qt coding<br>
> style.<br>
><br>
> <a href="https://wiki.qt.io/Qt_Coding_Style" rel="noreferrer" target="_blank">https://wiki.qt.io/Qt_Coding_Style</a><br>
><br>
> That said, either would be fine with me.<br>
<br>
</span>I'm not too wedded to either (I personally prefer Allman for C++, but<br>
K&R braces for C, Rust, JavaScript, and other "braced" languages[1], though<br>
I've preferred using "} else {" to the style here[2]).<br>
<br>
No matter what, can we please (continue to) enforce that braces are<br>
*always* used even if the innards are a single line?<br>
<br>
--Ben<br>
<br>
[1]Rust, JS, and Java have style guidelines. C is usually because the<br>
projects in C I work on are contributions and copying upstream is best.<br>
[2]"Robin's egg blue is obviously better than turquoise" :P<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br></div>