Revisiting Google C++ Standards
Google produces a lot of software in C++ so they have prescribed a set of standards for all C++ Google Software. There's a lot of wisdom in there and some interesting stuff. If you're an experienced developer with C++ then you can probably ignore it but if you're starting out it's not a bad set of rules to take on board. Here are a couple of interesting points:
Namespaces
- Don't use Using as in using namespace std; This pollutes the namespace.
- You can use anonymous namespaces.
Exceptions
Google don't like you to use exception handling. Thankfully there are some "exceptions" to this rule regarding Windows Software and existing code that uses exceptions.If you have Python on your computer then there is a Google python script that will check your C++ code to see that it conforms with the style guide.


No comments yet. Leave a Comment