3 ms·
From what I understand, Google is really about a crippled subset of C++, that people jokingly call "C+-". I ran a C++ shop for 25 years. I used to program in i
by ChrisMarshallNY 4y ago
From what I understand, Google is really about a crippled subset of C++, that people jokingly call "C+-".
I ran a C++ shop for 25 years. I used to program in it, but stopped, many moons ago. The new C++ is a huge change from what I knew.
I am expecting to see a lot of hate for the language, in this thread.
Regardless, it is a very powerful language, and it is not for the faint of heart.
I attended a Swift conference, many moons ago, and one of the speakers was this wonderful woman that had recently moved to Adobe (a C++ shop).
She was supposed to speak about Swift, but ended up speaking about C++, and the wonderful, supportive community of older, experienced developers she found, around the language.
I loved it, but I'll bet a lot of the folks around me, were squirming.
- kabdib 4y agoC+- is pretty common. I last read the Google C++ guidelines maybe ten years ago. They were pretty much in line with the decisions that other large C++ projects I've worked on had made, like we all encountered the same footguns and language misfeatures. Every 5-10 years there's a big shakeup and the C++ culture changes, but it takes a long time for things to filter down into the embedded world (for instance).
- jupp0r 4y ago"From what I understand, Google is really about a crippled subset of C++, that people jokingly call "C+-"." Chrome is pretty good at using modern C++ FWIW.
- pradn 4y agoIt's hardly "crippled". I find myself quite productive writing C++ at Google. Take a look at the style guide yourself. I think it's pragmatic. https://google.github.io/styleguide/cppguide.html https://google.github.io/styleguide/cppguide.html
- cmrdporcupine 4y agoAll sane C++ codebases must use a defined subset of the language. Google's is one that works for them, with some pretty strong standardization. It's a good set of compromises. But you won't get far programming in it if you don't know the broader semantics of the language. I didn't do C++ from about 2003 to 2013. When I came back I was delighted. It's so much better.
- ChrisMarshallNY 4y agoI liken C++ (and other "industrial" languages, like PHP), to "advanced" tools, like the specialty tools and brands, that only professional mechanics know, like OTC. You won't get them at Home Depot. The language definitely has its niche, and I am glad to see it not being used for standard GUI programming, anymore. But for that niche, there's nothing better, and it's a big niche.
- TremendousJudge 4y agoWhat can PHP do that other less vilified languages can't? What is its "niche"?
- ChrisMarshallNY 4y agoPlease, everyone is supposed to be slagging C++ (and me), here. I'm sure there will be rich opportunities to dis PHP, in other threads.
- TremendousJudge 4y agoYou are right, my apologies. It was just so surprising a mention I couldn't stop myself.
- gridspy 4y agoMy experience from 1990 was it was the perfect language to add a bit of server-side logic to some raw HTML. So the niche (for me) was a nice transition from something I understood (HTML) to something new (dynamic webpages). In that way it is similar to batch files / bash scripts.
- VHRanger 4y agoIf only unique_ptr makes the whole experience so much better
- orwin 4y agoAh! "C+-" is what i called Golang when i first tried it around 2014-2015. I guess i can see where some ideas came from. (Still a very good language if you know what to do with it)
- UncleMeat 4y agoPerhaps 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 ago
- wnolens 4y agoMSFT was the same (at least the corner of it that I knew). We called it "C, with classes". I never apply to C++ jobs despite those 6 years of experience because I think my knowledge there is stuck in 1999 and I have no idea about the STL.
- sqeaky 4y agoLearning the language fundamentals robustly is the hard part, and everyone has incomplete knowledge. The C++ standard library is easy to learn for someone in your position. If you want to, start with something like iterator pairs and few trial problems, it will feel just like pointer arithmetic then the standard algorithms will be easy. I have tried to focus on C++ during my career and I still haven't even touched ranges or needed about half the std algorithms.
- hardlianotion 4y agoRanges are a little frustrating, they aren't uniformly implemented across the commonly used compilers.
- Analemma_ 4y agoThere are only two types of C++ shops: the ones that use a rigorously-enforced subset of it, and the ones where the codebase is an impenetrable hornet's nest. You must decide on a subset of C++ to use or you'll go insane. Google made some opinionated choices and tradeoffs about which subset to use (as did Microsoft and every other company with a huge C++ codebase), and it's possible to disagree with the specific boundaries they chose, but the mere fact that they chose to do this is unimpeachable.
- maxloh 4y agoDid they upload the recording to YouTube? I would like to listen to her.
- ChrisMarshallNY 4y agoIt was try!Swift New York, back in 2017, or so. I don't think they published vids, but maybe. I'll have to go look at my badge, to see which one it is. https://www.tryswift.co https://www.tryswift.co [UPDATE] It was 2019. They have videos, but hers (and a few others) aren't there. [UPDATE 2] Found it. It isn't linked from the main site, but is on the YouTube playlist: https://www.youtube.com/watch?v=CZOVnlwWPZk https://www.youtube.com/watch?v=CZOVnlwWPZk It's a really good talk. I like her attitude. This is her: https://www.savinola.com https://www.savinola.com
- maxloh 4y agoThanks. I watched it. That was a lovely talk and changed my perspective on C++. My impression was that C++ is a ancient language with lots of footgun. The talk reminds me of its value. C++ is still evolving. Improvements are introduced slower compared to other languages, but still, C++ is making progress and many found it pleasant to work with. It just need more time.