With the insanity that is Googles c++ coding style I am really surprised. Only a single, reasonable warning against broken functionality provided by the standard library. A good IDE should be able to automate almost all of it.
With the insanity that is Googles c++ coding style
Can you elaborate? I haven't heard many complaints about it. I gave it a cursory glance and it looks fairly reasonable including the pro/cons of each decision.
The pros and cons listed are often woefully incomplete due to that the C++ guidelines seem to have been written by someone (or a group) that does not actually know C++. Quite often they do not mention the idiomatic use of the thing being forbidden at all, suggesting that the authors are either being intellectually dishonest or simply have no idea what modern idiomatic C++ looks like.
do not use exceptions, because old projects do not use exceptions. Having try{}catch(std::exception const&){} at API boundaries is not that hard.
constructor + init separation, caused by the no exceptions rule. Limited RAII for you
no move semantics, because it is new to developers and developers apparently are unable to understand value semantics (wtf? for what are they paid?)
very restrictive list of boost libraries allowed, among other things no filesystem lib in that list. For fear against functional code.
on operator overloading it tells you to avoid the standard library. Sorry it tells you to avoid the "standard" library, yes they put the standard in quotes and yes they mean std::vector, std::map, etc. . It tells you to define Equals() and CopyFrom() instead and gives a workaround for map keys that does not require operator<(). You may use the "standard" library classes only if you can justify it.
Just to name a few gems that butcher half the language including several core concepts of modern c++ and what little there is at a standard library.
I am on a mobile device and can't find you the link, but I remember finding XML for eclipse and a few other ide's formatters from Google.
I won't say that I agree with every guideline, but it is close to how I format my own code. One major exception: 80-100 character lines. Fuck that shit. This isn't 1992.
7
u/josefx Jan 30 '14
With the insanity that is Googles c++ coding style I am really surprised. Only a single, reasonable warning against broken functionality provided by the standard library. A good IDE should be able to automate almost all of it.