Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have heard Google uses Python, Java and C++. But what I don't know is how is each of those programming language is used. I mean what is Python, Java and C++ is used for at Google. Why would they used upto 3 programming languages when 1 language is enough. Does anybody know?

share|improve this question

closed as too broad by gnat, MichaelT, GlenH7, Dan Pichelman, Wayne M Aug 8 '14 at 18:30

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

Also, you forgot Go. – cbrandolino Jan 21 '11 at 11:36
If one language is enough, why is there Python, C++ or Java at all? We could all just use the Assembly language for the processor our systems are running. – Lazarus Jan 21 '11 at 11:52
Saying one language is enough is like saying one type of wood is enough, would you respect a carpenter who had only worked in Pine, but never maple or oak? – Zachary K Feb 16 '11 at 16:27
Also, you forgot Sawzall – Chiron Apr 22 '11 at 16:41
They used java Check this… – devopsEMK Jun 17 at 10:22
up vote 92 down vote accepted

The correct answer "because different languages have different strengths " has already been stated. But let me provide some more detail on why:


C++ has the main advantage of being the fastest of the lot. Not necessary because Java and Python are slow, but because in C++ you have more control about how things get executed.

For example, if you are writing a web services frontend and require less than 30ms latency you can tune C++ code to get that performance. In a managed language like Java it is a big harder to get the GC to cooperate perfectly.

C++ is used for a lot of 'Google magic' such as BigTable, MapReduce, and search goo.


For most standard applications, Java is a perfectly fine language. It features great tools, lots of existing libraries, and not a lot of time spent debugging.

Java is used for a lot of bigger websites that would be much more difficult to maintain in a lower-level language like C or C++. For example, my understanding is that GMail is written in Java.

Also, note that you can use Google's Web Toolkit to compile Java code into JavaScript. So that awesome webpage or widget you see might have began life as a Java class.


Python is a fantastic general purpose language, but doesn't offer as much fine-grained control as even Java. (For example, there are all sorts of crazy JVM arguments for things -- does python offer similar configuration?)

However, with Python is perfectly suited for simple websites and applications that would otherwise be horrible shell scripts. For example, if you wanted to write a simple testcase to gather data from some sources, process them, and upload them to App Engine Python would be a good choice. (If you needed to distribute that processing across 1,000 machines however, perhaps you could use a different language...)


Obviously Google uses a lot of JavaScript. However, the type of JavaScript written at Google is different than what you see in the wild. Google has developed an optimizing JavaScript compiler that allows you to construct annotations in comments in exchange for better optimizations and static checking. See Google Closure.

Language Doesn't Matter (interop)

Another reason why Google doesn't use just one language is that it doesn't need to. There are facilities in almost every modern programming language to call into external libraries, libraries which may be written in a different language. (See swig.)

Also, since App Engine runs the JVM you can run any language that compiles to Java byte code. (At Google we primarily stick to the languages mentioned here, but this isn't a hard requirement.) If you want to use Closure, Groovy, or Scala on App Engine if you include the right JAR files everything should just work.


Also, Google uses and contributes to a lot of Open-Source where possible. These projects usually are written in one of the above languages and requires it to be 'used' at Google.

The bottom line is two things:

  • Every programming language has its own strengths. To not take situationally take advantage of these strengths would be a shame.
  • The available of interop toolkits and compatibile runtimes means that it is less painful to use multiple languages within the same runtime environment.
share|improve this answer
From your explanation does it mean that GMail uses GWT? – Joshua Partogi Jan 21 '11 at 22:37
Google is currently using python for web appplications also. – Raphael Jan 27 '11 at 19:50
1 language is enough

Maybe one language is enough to complete a number of different tasks adequately, but different languages have different strengths, weaknesses and abilities.

Since google most probably program for a large number of different situations it's a case of horses for courses, the best tool for the job.

share|improve this answer
+1, Using the best tool for the job. I'm currently working on a single desktop application that uses 3 programming languages (plus various markup and database languages). Close to metal stuff with C++, main application with Java, and some Jython here and there for easy customization. It makes sense to take the best of all three worlds, IMO :-) – Joonas Pulakka Jan 21 '11 at 12:05

These three languages are used for different purposes.

Python might be used for writing automation scripts.
C++ for implementing complex algorithms.(Indexer, Crawler, Map-Reduce, Big Table)
Java for web services, web apps, etc.

These are my assumptions only.

share|improve this answer
I'd implement complex algorithms - not extremely performance-critical - in Python. – delnan Jan 21 '11 at 15:28

Python is used for their support website,you can see that This page is generated by a python script,they use java libraries for web applications,hence the GWT and java support in the app engine

I think they use C++ for google earth,or for desktop applications in general

share|improve this answer

"1 language is enough" can only be true if every project you do is of a specific kind. And for some projects, even C++ Java and Python are not the best tools. Furthermore, knowing only one language is a distinguishing feature of the poor programmer.

share|improve this answer

They write native Mac and iPhone applications too, and those are in Objective-C. The reason they do that is simple: the APIs are in Objective-C.

share|improve this answer

protected by gnat Aug 7 '14 at 16:12

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.