-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Style #12
Comments
In my view, it would make sense if it's automatic and possibly a pre-commit hook. I've been thinking about using Astyle or better ClangFormat, as it is based on a real compiler, but then gave up the idea for my projects. There are many things to a style guide, and the discussions about those are always hot. I'd rather recommend writing down "C++ usage best practices in hiberlite", as these are more dangerous than whitespaces, and can be best checked using code reviews. Google C++ Style Guide is an example of such an approach, and is a living document too. There are, of course, automatic checkers of C++ usage too: Clang Static Analyzer, cppcheck, cpplint.py, etc |
I know style guides are a subject of numerous flame wars. Choosing the best one is not my goal.
There's little to no value in trying to decide on what is the best style guide is, or inventing a bespoke style guide for hiberlite. An argument against Google guide is that they are building end products, whereas hiberlite is more like a "standard" library (not really standard but really wants to become one when it grows up). So I'd like user facing API to follow same style as STL and Boost. |
When I started the project in 2004(ish) I didn't know much about coding styles. Decision I regret the most is using tabs (because it's 2014 and nobody else seems to be using tabs for formatting).
We should a) choose a C++ Style Guide for all future code; b) convert existing files to this style.
I think Boost style guide would be a natural fit, since whole library is mimicking Boost Serialization where possible.
Any ideas or suggestions on this?
The text was updated successfully, but these errors were encountered: