C++ and Java over Python in Google products
In Google, most of the products are written in C++ and Java. They usually don't choose Python to write their product stack. What's behind the decision to choose one language over the other in Google? Let's get to read some opinions from Robert Love, a Google software engineer.
Love said he couldn't imagine writing let alone maintaining a large software stack in
There are a bunch of reasons for the primacy of C++ and Java:
. They use , , and for production software systems, with Python employed for scripting, testing, and tooling.
- Familiarity. Early Googlers were well-versed in C++.
- Performance. Java can be faster than Python; C++ can be faster than Java.
- Tooling. Tools for debugging, profiling, and so on are significantly better for Java than Python. Even C++ is easier to debug and understand in large systems.
- Concurrency. As you can imagine, Google systems are highly parallelized and many are highly threaded. Threading in Python is an unmitigated disaster. The global interpreter lock (GIL) is a giant pain in the ass.
- Lack of need for the prototyping prowess of Python. One commonly-cited strength of Python is that it is easier to rapidly prototype small systems in Python than Java and (to an even greater extent) C++. At Google, however, this benefit isn't all that appealing: We have a lot of powerful frameworks that make prototyping or extending existing systems easy. Folks tend to prototype by gluing a hack into an existing server rather than build an entirely new distributed system.
Finally, he said "
So the final suggestion is the language to be used depends on the requirement of the product, sometimes even in the same product we may use different languages.
COMMENT (TOTAL 2 COMMENTS)
Yesterday I was using a DVD to install an OS. In the meantime, the command line prompt asks to Press any key to boot. I searched the whole keyboard and didn"t find the any key. I was so frustrated that I hit the keyboard heavily. You know what? The reboot started and installation completed. What hap
You make the world better, the world makes us better.
No other version available yet.