Closed mathbunnyru closed 1 week ago
To have a consistent history and since the formatting commits were always explicit, I think we should actually just leave the files diff as is (not ignored) so that we know that a change was made regarding the format.
@klaim Any objections on the format result? (We may change the options if any).
@Klaim Any objections on the format result? (We may change the options if any).
Looks tolerable to me. 👍🏽
To be completely clear, there are things I'm not a fan of but that I can totally live with:
auto ... ->
function signature syntax is nice, but I would prefer the short signatures to not have that second line, as it seems not necessary (only on short signatures) - but I can live with systematic return type separated;{
on the same line as the signature (like some post-java languages?), so that the content of the body looks like it's part of the expression hosting the lambda expression (func(a, b, []{ ...
), and it avoids having too many lines in short lambdas, and also that makes the lambda expressions standout stylistically when you use a different style for most C++ expressions ({
and }
always on a new line for example, to mark a scope clearly); here we get a new line per {
systematically and the signature is kind of disconnected visually - but it's really minor and I can also totally live with it;if
, because of the sometime unnecessary verbosity (wicth hurts maintenance) but I understand that it helps with debugging (which helps maintenance) so I can live with it too;Also I don't know the limitations of clang-format regarding these minor points, maybe it's just not possible to have the exact style I prefer. Probably not worth our time if everybody can live with this style.
So I think we're good to go. 👍🏽
I let anyone of you merge this PR.
Possible options (I didn't change any): https://clang.llvm.org/docs/ClangFormatStyleOptions.html