On Google C++ Style Guide

I've mentioned a few times in passing on this forum that Google C++ Style Guide is a piece of trash, but today I had a little bit of time to put down my major points of disagreement with it. It came out a bit long for a forum post, so here's the link: http://www.linkedin.com/today/post/article/20140503193653-3046051-why-google-style-guide-for-c-is-a-deal-breaker
Some of these really confuse me, like the banning of exceptions, unsigned integers, std::function and relatives (what, do they expect you to use templated function pointers?), copy construction, or mandating two-stage construction EDIT: and banning default values.

I can understand banning multiple inheritance, operator overloading, or anything to do with rvalues due to the risk of confusing the ex-Java programmers [/snobby-Java-programmer-discrimination].

But... barring exceptions? Like you said, I can't see any justification for that. Especially since that this would really throw off the Java programmers.

Thank you for sharing.

-Albatross
Last edited on
" Getters and setters are not something I'd ever recommend, but at least it's a "you may also""

Could you eleborate on this?

Also what are output arguments?

Also...why does google grill potential hires on questions pertaining to concepts that are banned from use?
Could you eleborate on this

class is most useful when it behaves as a cohesive whole, not as a collection of loose pieces.

Also what are output arguments?
1
2
std::string out;
getline(std::cin, out); // out is the output parameter, cin is in/out 
The "decision" part even recommends storing pointers in containers and using them in function calls,
I'm sure that processor cache will love an array of pointers to bunch of small classes littered all over the memory.
Last edited on
I like the C++ style guide and it is wonderful.
@giokafir are you sure you're talking about the same style guide?
Topic archived. No new replies allowed.