<div dir="ltr">On Tue, Jul 14, 2015 at 2:18 AM, Frank Loeffler <span dir="ltr"><<a href="mailto:knarf@cct.lsu.edu" target="_blank">knarf@cct.lsu.edu</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi<br>
<span class=""><br>
On Fri, Jul 03, 2015 at 05:33:55PM -0400, Erik Schnetter wrote:<br>
> I propose to re-format Carpet's source code via clang-format.<br>
<br>
</span>One question I couldn't find an easy answer for using Google: how often<br>
and how much does the default format style change?<br>
<br>
The reason I am asking is that if that happens, not only will we have<br>
users with different versions having the problem of back-and-forth<br>
only-format changes, we also will have to create a lot of 'update to<br>
format x' commits to avoid mixing them with real changes.<br>
<br>
The same would happen if we decide that the default isn't doing exactly<br>
what we want, and change it. (and I've seen a few examples I didn't like<br>
- just not yet some I would care enough about).<br>
<br>
Did anyone compare the available styles for C++, and how often _they_<br>
change?<br></blockquote><div><br></div><div>clang-format knows different styles (LLVM, Google, Chromium, Mozilla, WebKit), and of course you can define your own via .clang-format files, usually using one of these four as starting point. I briefly looked at them, and I found LLVM to be the closest to "usual" (dense) C++ formatting; LLVM unsurprisingly also the default.</div><div><br></div><div>I agree that clang-format makes sometimes choices that I wouldn't make. However, the resulting code is always very readable. And since the whole point of using an automated formatter is that one doesn't have to care about the style and fine-tune it, I decided to simply use the LLVM style and forego the bikeshedding.</div><div><br></div><div>I don't think these styles change at all. I'm not aware of changes in the past year. They have seen improvements to certain corner cases, or have been extended to handle C++14 and now C++17 constructs, but I'm not aware of any changes ("hey! let's change indentation from 2 to three 3 spaces!").</div><div><br></div><div>-erik</div></div><div><br></div>-- <br><div class="gmail_signature">Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>><br><a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a></div>
</div></div>