

Of the following principles, but is already vanishingly rare, so the Style

Than the rules we do: for example, goto contravenes many This principle mostly explains the rules we don’t have, rather Still have a small benefit if people are unlikely to do itĪnyway.

Get without the rule, so a rule against a very harmful practice may The benefit is measured relative to the codebase we would Must be large enough to justify asking all of our engineers to The goals of the style guide as we currently see them are as follows: Style rules should pull their weight The benefit of a style rule (some can be), and what sort of argument or alternative would be Serving, it should be clearer to everyone when a rule may be waived If you understand what goals each rule is The fore, we hope to ground discussions and make it clearer to ourīroader community why the rules are in place and why particularĭecisions have been made. There are a few core goals that we believe this guide should The reader is familiar with the language. Note that this guide is not a C++ tutorial: we assume that Google conform to the requirements in this guide. The term Style is aīit of a misnomer, since these conventions cover far more than The conventions that govern our C++ code. Style, also known as readability, is what we call Keep the code base manageable while still allowingĬoders to use C++ language features productively. The goal of this guide is to manage this complexity byĭescribing in detail the dos and don'ts of writing C++ code This power brings with it complexity, which in turn can makeĬode more bug-prone and harder to read and maintain. Programmer knows, the language has many powerful features, but C++ is one of the main development languages used by
