Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

There's a widespread belief among that the more dynamic and loosely typed the language, the more productive the programmer will be in it. Guido van Rossum wrote about programming productivity using python in 1998 and searching around the web I still see people referencing this exact claim:

Syntactically, Python code looks like executable pseudo code. Program development using Python is 5-10 times faster than using C/C++, and 3-5 times faster than using Java. In many cases, a prototype of an application can be written in Python without writing any C/C++/Java code. Often, the prototype is sufficiently functional and performs well enough to be delivered as the final product, saving considerable development time. Other times, the prototype can be translated in part or in whole to C++ or Java -- Python's object-oriented nature makes the translation a straightforward process.

Has this issue been properly scientifically evaluated? If not for then perhaps for sibling scripting languages like , or ?

I'm not looking for rationalizations, analogies, or explanations why it could potentially be hard to answer, unless it's the opinion of researchers or experts that has taken the time to look into the issue.

I initially asked this question over at skeptics.SE, and someone suggested I should ask it here too.

share|improve this question
Well, since you've restricted the set of possible answers, I just dare a comment by asking another question which should be answered first (imho): Is there a reliable and estabilished metrics for measuring the "productivity of a programmer"? –  Paul Michalik Apr 17 '11 at 8:49
@Paul Michalik - I would assume that any research paper that looked at productivity would have a definition included (otherwise it would be really hard to measure). So if someone referenced research it would be helpful if they included the definition in the answer. There is probably (I'm guessing) several different perfectly acceptable ways to measure productivity, perhaps "Time it takes to pass a number of unittests" would be one of them. –  Kit Sunde Apr 17 '11 at 8:53
Yes, there just "too many" ways which, from my point of view, very often contradict each other. All articles, books, blogs, talks.. I have read or heard with regard to this topic were more or less subjective or narrowed to a very specific set of problems making the results hardly applicable... –  Paul Michalik Apr 17 '11 at 9:07
You might be interested in this article: citeseerx.ist.psu.edu/viewdoc/… –  Niphra Apr 17 '11 at 9:56
The only relatively valid research I've seen is mentioned here: page.mi.fu-berlin.de/prechelt/Biblio/jccpprtTR.pdf (linked from here: norvig.com/java-lisp.html ) –  SK-logic Apr 17 '11 at 11:28

5 Answers 5

Ousterhout's article1 about scripting languages suggests that the higher level the programming takes place, the more productive the programmer is. If we take that, as Boehm says2, the number of lines a programmer can write in a given time is constant and not dependent on the language or its type (low level, system programming, scripting), one can easily believe the claim. The resulting instructions-per-source-code-line -ratio can be an order of magnitude (or several) better with scripting languages than with system programming languages.

As scripting languages heavily rely on ready-made utilities for common tasks (e.g. data structures, string manipulation), their main use usually is to enhance productivity with the cost of slower running speed by providing a syntax that's easy to learn and efficient to upkeep programs with. One doesn't resort to a scripting language when top execution speed is needed.

[1]: J. K. Ousterhout, Scripting: Higher Level Programming for the 21 Century, Computer (IEEE), 1998
[2]: B. Boehm, Software Engineering Economics, Prentice Hall, 1981

share|improve this answer
While this is a good answer, don't forget that modern non-scripting languages also tend to come packed with ready-made utilities that make development fast. C# comes to mind. Anyone who feels Python comes with more pre-canned utilities than C# simply happens to know Python better than C#. In reality they both have a vast and comparable range of "built-in" utilities. –  romkyns Apr 17 '11 at 13:10
@romkyns, for any non-trivial project you need to write a lot of code. Even if you have plenty of Lego bricks the Bionicles do not magically come together. –  user1249 Apr 17 '11 at 15:43
@Thor but it does really rather help to have those Lego bricks upfront, instead of having to build an oil drill, a plastic factory and a lego block extruder first. –  romkyns Apr 17 '11 at 17:59

If you measure productivity as "time to write a specific simple program" then it depends so much more on programmer experience and quick mind than the language that you are really evaluating the programmer, not the language.

I believe timed code contests indicate that the language doesn't really matter for those kinds of tasks. There is no one language that wins such challenges easier than others (at least not if you allow for the relative popularity of languages).

If you measure performance as "the effectiveness of the best program" written in a given language, then it's even less language-dependent. See for example the results of the Galcon AI contest. The winner is written in Lisp. The next Lisp entry, however, is ranked #280. What does this tell us about the language's suitability for writing great AI efficiently? In my opinion, nothing. It just tells us that "bocsimacko" came up with and implemented the most effective algorithms. For the record, time was not a major factor in this contest - people had more than two months to develop their code.

Lastly, if you measure performance as "long-term cost of maintaining a project" then I think you're onto something. Especially if you hire only the best people for the job, and count cost in man-hours rather than dollars. I have a strong opinion on which languages are best for this, but having no hard evidence to link you to I'll leave this opinion out. Perhaps someone else has links for this type of performance.

share|improve this answer
"you are really evaluating the programmer, not the language" - Not if this is actually done scientifically. Take 100 programmers. Select a general project such as "Write a calendar app with these specific requirements". The requirements a tied to automated unit testing. 50 programmers write the app in C++, 50 in Python, selected at random so the quality developers are evenly dispursed. The results would be a score combining the average time to completion with the number of unit tests passed. Compare the average of the Python results with the average of the C++ result and...SCIENCE! –  Morgan Herlocker May 4 '11 at 21:35
@Prof Maybe if you get a thousand of each... but still, how do you control for the fact that only people with a certain mindset and a certain level of ability will know C++? –  romkyns May 4 '11 at 21:44
you could make your sample only pull from people who can pass a proficiency test in C++ and Python. A lot of my old professors were doing very similar studies. Also you make a couple of assumptions that others have discussed here: programmers.stackexchange.com/q/73715/3792 –  Morgan Herlocker May 5 '11 at 14:27

http://page.mi.fu-berlin.de/prechelt/Biblio/jccpprtTR.pdf is one of the few studies which I am aware of that did an actual direct comparison between productivity in various languages. It is old, but worth reading if you find the topic interesting. The comparison has a number of major shortcomings which the article is very honest about.

The overall result is that low level languages (eg C, C++) take longer to write, can take much less memory, and can run much faster. But with very high variability. High level scripting languages tend to take half as long to write and have less variability in approach. To an initially surprising degree, there does tend to be an obvious way to do something in a scripting language.

Note that all performance numbers for Java should be taken with a major grain of salt - the paper was produced in the 90s before people had a lot of experience with Java, and before the JVM was well optimized. Both factors should have significant impact.

share|improve this answer

To put it generally, writing a program in Python will usually be faster than writing the same program in C, C++, Java.

It is also likely to run slower.

There are, of course, particular applications for which other languages may be quicker because certain tasked involved are 'more natively' supported.

While I am not aware of any studies to confirm this increase in speed/productivity (as one commenter mentioned, this can be tough to measure precisely), there has been direct research into the expressiveness of language.

I think there is some merit to a correlation between language expressiveness and programming speed. Just picture a simple iteration pattern and how a Pythonic for-loop or list comprehension can be more succinct. Not only can it be immediately typed faster, but it also eliminates concerns of off-by-one errors, indices out of bounds, and other such problem that can significantly slow the coding process.

This shows a table an estimate for expressiveness ratios of languages. While it should be taken with a grain of salt, the footnotes it mentions are very worthwhile.


share|improve this answer

Last time I used Java (a while ago admittedly) it took a screen full of code to open and write to a file. Compare that to a couple of lines in Python or Perl, and you can guess which one is faster.

Obviously languages all have their own strengths and weaknesses, but for most tasks Python will be faster to write.

share|improve this answer
"it took a screen full of code to open and write to a file": Put this into a utility class with two methods write() and read() and in the rest of your Java project file access will be as concise as in Python. I think your example is a bit too restricted to compare Python and Java (even though I agree that Java tends to be more verbose). –  Giorgio Dec 31 '12 at 14:13
Sure, but Python, Perl and higher languages have generally thought about that stuff in advance, and so you don't need to write the utility classes (or not as many of them). Using a utility class still takes time, and is a principle of reusable code that applies top both Java and Python depending on what you are actually doing. –  wobbily_col Sep 20 '13 at 10:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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