3 ms·
Perhaps in the past, but they aren't too terribly far behind C++20 and a bunch of stuff that has been added to the language over time (like stringviews) was mad
by UncleMeat 4y ago
Perhaps in the past, but they aren't too terribly far behind C++20 and a bunch of stuff that has been added to the language over time (like stringviews) was made available much earlier via library support. I don't think I've ever heard this "C+-" joke at Google despite working in C++ here for a very long time.
- ChrisMarshallNY 4y agoI heard it quite frequently, but not from people that worked there. I believe that there was a published style guide. My experience is years old, but I remember seeing that it was basically “C++ without objects.” It’s a great language, and the 20 additions bring it right on par with other languages, in terms of type and memory safety.
- dvirsky 4y agoMaybe more like C++ without (most) pointers. A coupe of years ago they allowed mutable references in function arguments, so the use cases for passing pointers around were reduced even further.
- ChrisMarshallNY 4y agoThat's it. Not "without objects," but without pointers. One of the things (back then) that made C++ so powerful, was direct memory access. However, I really like style guides. Except the Taligent one: https://root.cern.ch/TaligentDocs/TaligentOnline/DocumentRoot/1.0/Docs/books/WM/WM_3.html https://root.cern.ch/TaligentDocs/TaligentOnline/DocumentRoo...
- UncleMeat 4y ago"Don't use pointers" was definitely never in the style guide.
- ChrisMarshallNY 4y agoWell ... like I said, it was a long time ago (I don't know if Google had even made their first hundred billion, yet). I suffer from CRS. You know how us old "boomers" are... Not interested in fighting about it. I'm sure that I'm wrong. Being right buys me absolutely nothing. It's not my wheelhouse.
- UncleMeat 4y agoThe style guide is publicly available: https://google.github.io/styleguide/cppguide.html https://google.github.io/styleguide/cppguide.html I've never heard anything remotely similar to "avoid objects" here.
- cmrdporcupine 4y agoYeah. If anything the Chromium codebase is bloated with uncomfortably intricate OO patterns. Google3, less so, but that's because that kind of server-stuff doesn't lend itself to the same kind of thing, maybe. I like the Google style guide overall. I tend to use it on new projects even though I'm not there anymore, and when I get into other people's code often my first instinct is to "clean it up" into that style :-)
- ChrisMarshallNY 4y agoWell, this was back in the C++ 11 days. No biggie. Won't get in a fight about it. Have a great day!
- UncleMeat 4y agoIt is true that the adoption C++11 was later than ideal. Since then, the C++ build and library maintainers have made a priority of not letting that happen again and have done a really really good job (IMO).