Skip to content

Comment on In the C++ bag of tricks: scoped locksparent

Comments

C with classes is what the google c++ style guide mandates: http://google-styleguide.googlecode.com/svn/trunk/cppguide.x...

No exceptions, no boost, no lambda, no rtti, streams only for logging, avoid operator overloading, etc.

The Google C++ style guide has its quirks, but describing it as "C with classes" is flat out wrong.

no boost

Not true, select parts of Boost are available.

no lambda

The C++11 features are being rolled in gradually. Lambda expressions are now permitted.

no rtti

The guide says "avoid RTTI" and urges the developer to come up with a different design. This is very much in line with C++ best practice overall. There's no ban on RTTI.

Version 3.274 says:

Do not use lambda expressions, or the related std::function or std::bind utilities.

It's unfortunately not synched with the internal version.

I don't agree with Google's style guide, besides they are not perfect.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.