tqdm/tqdm.cpp

Code style

CrazyPython opened this issue · 10 comments

Let's establish what code style we should use.

Coming from a Python background, I prefer K&R braces. From the little C++ code I've seen @casperdcl write, it looks as though he does too.

So what do you guys think?

https://google.github.io/styleguide/cppguide.html

On 9 August 2016 at 20:13, CrazyPython notifications@github.com wrote:

Let's establish what code style we should use.

Coming from a Python background, I prefer K&R braces. From the little C++
code I've seen @casperdcl https://github.com/casperdcl write, it looks
as though he does too.

So what do you guys think?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#10, or mute the thread
https://github.com/notifications/unsubscribe-auth/AKR9myt3gxbX_lLEhN3iOSaL1-98v9LIks5qeNE8gaJpZM4Jga3S
.

BTW I would just use http://clang.llvm.org/docs/ClangFormat.html which is like flake8 but fixes rather than just suggesting.

o11c commented

Google's style guide is universally recognized as terrible among C++ programmers ...

@o11c what should we use then? I like K&R braces coming from Python. It saves lines too.

@casperdcl poke poke

o11c commented

Saving lines is an insignificant measurement. Being able to properly keep diffs through history is very important.

@o11c Okay, but it increases code bulk

visual studio supports clang-format with -style=Google, and obviously so do all unix operating systems. I'd set your editors to use it and forget about it. We could spend ages arguing about double space versus 4 space versus tab, but imho it's not worth it.

@casperdcl he was talking about diffs

@casperdcl @o11c says Google's coding style is universally agreed upon by C++ programmers to be a bad style. I'm not sure how true that statement is, but I think we should have another look at this issue.

closed as this is a subset of discussion in #11. feel like opening an issue saying stop opening so many issues.