Comparing programming languages is fiendishly tricky. Many hold that it is not valid to do it at all.

Here is some material that I have come across recently that strikes me as useful:

Colourfully titled essay discussing some flaws of comparing languages: The Computer Jihad (Ovid)
Insight into how and why a startup might choose a programming language: Beating the Averages (Paul Graham)
Two tables comparing the availability of selected features in a range of languages: 1 2

The final one is the report of some fascinating research. It attempts to allocate a level to a langauge based on the number of lines required to achieve certain Function Points:

I find this last one particulary interesting because it looks at the effectiveness that a language delivers to the developer rather than a simple comparison of features. For example, the designers of Java and C++ chose to be strict about features for valid reasons, but it turns out that the result of that strictness is much more developer effort. Agile languages such as Perl, Ruby and Python score well on this metric as many would expect (Lisp didn't score well but Eiffel did). What I wouldn't have expected until recently was for Objective-C to score so well. While Objective-C relies on very simple extensions to the standard C syntax (which scored 2.5), the concept behind it is so powerfull that it scored 12. Almost as high as the agile languages at 15.

What this means is that you can write (a certain class of) programs in Objective-C with a similar number of lines to what would be needed in Perl or Ruby. Yet Objective-C is all the things that people say are missing in Agile languages (like the speed and obfuscation of native compiled code for example).

As Ovid said (see the first link), there are valid reasons to choose different languages in different situations. After browsing a lot of analysis of features and effectiveness, it is hard to see how Java or C++ could ever be the right choice (with the exception of Java for binary distributed cross platform gui applets).

NB: This is a re-post from my developer blog:

Update: As per comments below, some scores seem unusual. SQL, for example, scores higher than Perl. Let's think about that: the measure is of how many lines of code are taken to do a thing. Imagine an sql query joining 5 tables with a sort, a group by and a sub-select. It's only 5 lines of code, but imagine doing that in Perl with hashes - even being smart with map, grep etc. it would be more than 5 lines. Of course you wouldn't do it in Perl, you would do it in SQL. I think a reasonable way to read the scores would be to compare languages that attack a similar goal.

Perl outscores C++. QBE and SQL score the same. Those are valid comparisons. HTML outscoring C++? Well sure, HTML (in it's "runtime") require less lines of "code" to display a document in a sans-serif font than a compiles C++ application, but it's hardly a fair comparison.