Cameron Laird's personal notes on language comparisons

Warning: as of 2005, this page is ill-maintained. Many of the links to external pages have become dead (or, worse, misdirected). Feel free to write me if you have particular interest in specific ones; I might be able to locate them for you.

Table of Contents


[false categories]

Andrew Cooke addresses "An Introduction to Programming Languages" to the same audience of practical programmers who read this page. Moreover, much of his content is comparative.

This empirical comparison of a handful of languages is very important.

Bilateral comparisons of scripting languages

Twice a month, we write about scripting languages for SunWorld Online. Several of the principles we favor for comparing languages appear in an earlier article.

Several of the benchmarks below are pertinent to scripting languages.

Larry Virden observes that
In my opinion, one difference between the Python and Perl comparison page and the Tcl comparison page is that the first two consist of pointers to papers and presentations comparing the languages. These appear to in general come to the conclusion that the respective language is the preferred solution. The Tcl page is a series of usenet postings accumulated over the past 3 years taken out of the context of the discussion, but each of which make some points which seemed at the time important to retain. As such, the Tcl page comes across to me as less of an public relations page. Both styles of comparison are useful.

The "Tcl-ers' Wiki" includes a great deal of information which compares Tcl to other languages. Start, for example, with "Is Tcl Different?".

Our only "Regular Expressions" columns for January 2000, called "Can your favorite scripting language take it to the next level?", commented on the scaleability of Perl, Python, REBOL, and Tcl.

Keith Waclena publicizes his Programming Language Crisis. James Logajan decides on Python in his Tale of Five Languages. Glenn Vanderburg documents The Tcl War which erupted in fall 1994, and a subsequent skirmish on the same territory.

Perl proponent John Porter labels Logajan's adventure "amusing but worthless". I believe it fairly represents common judgments in language particularly palatable to some readers. Porter also observes ("so out of date as to be nearly meaningless, except that his methodology is very interesting") that Waclena's procedure is more pertinent than his results, long superannuated by 1998.

[Write up comparisons of Lua to other languages.]

While conventional wisdom has it that text-mangling is Perl's strength, and its best practitioners are indeed astonishingly capable [give examples], Billy Tanksley parenthetically argues that Rebol's LL parsing engine gives a long-term approach which is both "much simpler and more powerful" than regular expression composition. Python could easily move in that direction ...

Craig McElwee writes typical code for several Web-service alternatives for developerWorks. Do not take his remarks as authoritative. However, even when details are mistaken (he seems rather removed from good practice with Perl and Tcl, for example), he's broadly correct in his conclusions.

Bilateral comparisons of object-oriented languages

Programming Language Exploration is a sophisticated exploration of Python, Haskell, Self, Tcl, Life, Lambda-Prolog, and Sather.

Matthew Kennel compares Sather and Eiffel. Often, in fact; it's a topic on which he's good, and to which he often returns. [Explain CAT problem.]

Erann Gat presents "Lisp as an alternative to Java".

Lars Garshol writes wisely on performance comparisons. While his remarks respond to a question about Python and Java, they apply far more widely. Self-described "Java expert" Glyph Lefkowitz also compares Python and Java, and concludes the latter has few advantages.

The Register and Neil Hodgson compared Python and C# shortly after the first announcement of the latter.

Ada vs. Smalltalk

Eiffel vs. Smalltalk

Victor Putz measures achieved results in C++ and Eiffel.

Maya Stodte compares Ruby to Python and Perl, mostly, with brief appearances by Smalltalk and Eiffel.

[Great usability comparison between Eiffel and C++]

Dylan vs. C++

A methodical case study by an interested party illustrates Dylan's advantages over Java for a system-programming task.

I like Greg Ewing's "Comparison of Python and Ruby Extension Interfaces". Doug Way's related comments on Smalltalk are also accurate. In another direction, Ruby has Perl's performance and much of its syntax, Smalltalk's purity, and Python's simplicity, easy extensibility (or is it easier? Ruby collects garbage, while Python counts references), and consistency. Matz recognizes that Python is more portable, particularly on the fringes. Maya Stodte nicely compares Ruby with both Perl and Python [now dated-2000].

Ruby is usefully compared with Smalltalk, Perl, and Python. The Ruby inner circle maintains a page of comparisons with other languages; this often includes "Thirty-seven Reasons I Love Ruby". Matz makes a particular observation about method invocation. A significant element of my own infatuation with Ruby is the first English-language Ruby book, by the XP and Pattern guys; they've done a breathtaking job of capturing the Ruby mentality in a programming introduction. I'd like to write so well.

Ruby vs. C++

In his explanation of a project to translate from Eiffel to Java, John Potter, an advocate of the former, writes "The principal advantages of Eiffel compared with Java are genericity, multiple inheritance and support for assertions." Victor Putz describes his switch from C++ to Eiffel. Bertrand Meyer wrote a classic anthem of Eiffel's superiority over C++ and Java. ... direct comparison of Java and C++ ...

Chris Rathman and friends implement a sample problem in a variety of (mostly object-oriented) languages.

Bilateral comparisons of functional languages

While Lisp and Python are functional only for generous observers, Norvig's popular comparison of these two emphasizes their functional aspects.

One quite serious comparative language comparison concluded OCaML a remarkably unambiguous winner for a range of numeric and scientific work.

[... personal remarks ...]

Engineering languages

It should be evident by now that these sections don't partition the space of all languages cleanly. The set of "engineering" languages--MATLAB, (Octave), Mathematica, Yorick, Gauss, ...--makes an interesting category. One way to think about this is the "scalability" of the special-purpose systems in comparison to more general languages. For example, Travis Oliphant and Huaiyu Zhu (author of MatPy) are two of the many people who've reported that they find Python (with NumPy) supports their long-term projects better than MATLAB.

In private correspondence, Mike Croucher wrote me this about MATLAB, Octave, and Scilab, which I reproduce with his permission: "...

It's not as source compatible as Octave which is a problem for some. Like I said, just an opinion really. I rate Octave very highly and was responsible for ensuring that it got deployed to all the centrally managed Windows machines at Manchester University - not because anyone asked me to but because I wanted people to see MATLAB alternatives.

... Octave is better at some things, scilab at others."

Web-hosted implementations

While there are thousands of interesting implementations of significant languages, I particularly want to emphasize on this page the availability of several web-hosted implementations. ... Simply Scala specializes in Scala (comfortingly enough). ... trypython ...

Miscellanea regarding choices between languages

[Explain that languages can complement and co-operate as well as compete.]

Benchmarks are powerful drugs, capable of great benefit and harm. Please use these prudently:

Samuel A. Falvo II aptly characterizes Forth and LISP as "diabolical opposites" for a Python audience. Billy Tanksley and I frequently link these two.

[ Python vs. Tcl; Scheme vs. Tcl; Java vs. Tcl (EET) ...]

[languages; modes; DCOM; CORBA; ...]

[competition; co-operation]

"Comparing Development Costs of C and Ada"


I've had a lot of help with this page. To my regret, I've managed to mislay most of the names of people who contributed it. Among those I know to recognize are
from the Republic of Perl
Cameron Laird's personal page on choosing a scripting language/