4 ms·
Yet C++ is what Google, Facebook, Microsoft and others still use for their most mission critical software.
by ppg677 5y ago
Yet C++ is what Google, Facebook, Microsoft and others still use for their most mission critical software.
- madhadron 5y agoMission critical software projects, by their nature are started rarely and make very conservative language choices. By its nature, much of it is old, so it's in C++. There's also a fair amount of it in C# and Java, too.
- MontagFTB 5y agoWasn’t a lot of Facebook’s initial implementation php? I seem to recall they moved off it, or wrote a specialized compiler to speed it up.
- wilsonthewhale 5y agoWeb logic is in Hack (offshoot of PHP), but all of the surrounding infrastructure has always been heavily skewed towards C++.
- eximius 5y agoYet they're also actively exploring alternatives. (Go, Rust, Haxe, etc)
- 01100011 5y agoWhen you're writing systems software you need systems software engineers and most of them are far more competent in C/C++ than, say, Rust, Ada, Go, etc. We choose C/C++ because it's what we know and what our colleagues know, but I think a lot of us wish there was a better alternative.
- jandrewrogers 5y agoNot to take away anything from your post, but Go is not a systems language. No language with a mandatory garbage collector can make that claim since it makes some systems code effectively impossible to implement.
- 01100011 5y agoI agree, but some people don't. When I interviewed at Google a couple years ago, they were rewriting the Fuchsia network stack in Rust. It was currently written in Go. My jaw about hit the floor when I heard that. I'm guessing they realized it was a mistake, but then again maybe the Go version was just a temporary placeholder. IDK, didn't get the job.
- pjmlp 5y agoBetter hold your jaw with both hands while reading this, https://www.f-secure.com/en/consulting/foundry/usb-armory https://www.f-secure.com/en/consulting/foundry/usb-armory
- 01100011 5y agoUh, if you think that's bad, I once worked at a company that made communications gear for first responders and the military. Most of their stack was written in Python 2. I'm not talking UI, I'm talking systems software level stuff. Python tied together with dbus on top of a shake-n-bake Yocto distro that was out of date. People's lives depended on that tower of crap.
- pjmlp 5y agoWhy should it be bad? One less device running C, with firmware written in a type safe language that takes bounds checking seriously. As for Python, I recommend you to have a look at IEEE magazine.
- jandrewrogers 5y agoRust is an entirely adequate systems language for most purposes. I think it could probably replace C for almost all purposes except in cases where extreme portability is required, which C excels at. C++ is really only the answer if you need extreme performance and/or expressiveness out of a systems language. Some code, like database engines, really benefits from that.
- 5y ago
- pjmlp 5y agoI moved away from full C++ development in 2006, yet C++ still is the tool I reach for in native code, because many libraries are only available in C++ or C, and I definitly will not be writing C unless obliged to do so. Microsoft had a project to move Windows mostly into .NET, sabotaged by their Windows team, which a decade later rebooted the ideas using COM instead, an idea that has been a commercial failure, while everyone just keeps migrating to .NET. Microsoft Security team pushed a best practices paper that new projects should use: 1. .NET 2. Rust 3. C++ with Core Guidelines, with Visual C++ analysers turned on 4. They also have a security annotations for C and C++ code (SAF) Google castrates the use of C++ to app developers in Android to writing native libraries to be consumed by Java and Kotlin, is behind the effort to adopt hardware memory tagging alongside ARM, the reason why Linux kernel no longer uses VLAs and the big pusher for Rust on the Linux kernel. So it is not just simply "they use C++".
- jillesvangurp 5y agoEach of those is also using and promoting Rust now as an alternative. Security is a major driver for that as each of those has been dealing with security issues in their C++ code bases regularly. They won't stop using C++ overnight of course but they are vastly less likely to use it for new things and are actively replacing C++ components with Rust equivalents at this point as well. In Google, which developed Go for the same reason, Rust is also competing with that.