1. Home
  2. Computing & Technology
  3. C / C++ / C#
David Bolton
David's C / C++ / C# Blog

By David Bolton, About.com Guide to C / C++ / C#

Revisiting Google C++ Standards

Monday November 2, 2009

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

  1. Don't use Using as in using namespace std; This pollutes the namespace.
  2. 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.

  • Link to Tools and Utilities Library
  • Comments

    No comments yet. Leave a Comment

    Leave a Comment

    Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

    Explore C / C++ / C#
    About.com Special Features

    Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

    Easy ways to connect two computers for networking purposes. More >

    1. Home
    2. Computing & Technology
    3. C / C++ / C#

    ©2009 About.com, a part of The New York Times Company.

    All rights reserved.