Meaningless comparisons

Computer enthusiasts are amazingly good at producing meaningless comparisons. I came upon an excellent example: Languages Versus D. It's a Wiki page that compares several programming languages to D, a rather nice evolutionary language.  I'll pick just a couple of examples to show you what I mean by meaningless here.

The table says Java doesn't have function delegates while e.g. D, C# and Delphi do. Is this a problem? Perhaps for some, but function delegates are largely replaced with use of inner classes and interfaces. Is it a better approach? I don't think the programming community at large has yet arrived to a consensus here.

C# has Dynamic Class Loading while C++ doesn't. Well ok, the .NET BCL contains tools for loading .NET Assemblies dynamically. That's a good feature, but the truth is not really that clear-cut. C++ programs can load classes dynamically, too! Some of that may be OS dependent or based on a COM-like architecture, but hey, dynamically loading plugin architectures have hardly ever been anything .NET specific.

I could go on and on. Binary reductions rarely work, and in addition to that, the selection of comparison features is somewhat biased. Rows for language features such as class properties, multicast delegates, template/generic typing and many others are missing. A partial reason is there, too: "Don't forget that original of this page was created to praise D, so it still, even after all our modifications, contains strange features that are of interest only for whose seeking even smallest D advantages over C++/C#/Java". It's just that this disclaimer is in relatively small print in a "Definitions" section of the page.

My point? This comparison borders on being more harmful than useful. It does have many facts straight, but on the whole, it is not balanced. For example, it says C has Regular Expressions available as a library but C++ doesn't. Looking at the comments, it is obvious that somebody with only C knowledge added the "Lib" marker for C, but hey, C++ can use the same libraries. It's just that nobody considered the change made for C to require re-evaluation for other languages (or even if he/she considered it, it was beyond his/her ability to perform the double-check).

While single data items may be mostly correct, a valid comparison takes something more. The chosen values need to reflect a valid comparison between columns, not just the "correct" data. There are very few individuals who could conjure up that table by themselves (and I'm certainly not one of them!), but using a Wiki to gather the information isn't that reliable either. Wikipedia survives because it has a sufficient number of editors to merge the different perspectives. Most projects do not have that luxury. 

I certainly do not wish to bash the authors of this particular page. They've done their job, and quite likely in good faith. But good faith doesn't produce a good comparison. Pages like this are very easy to misinterpret, and the world is filled with them. We really need Annotea or a similar system to aid with pointing out the problems in various information sources. Wikis work to an extent, but are not the final solution.

Ps. To be constructive, let me suggest: If you want to compare programming languages, write series of short articles describing common approaches to everyday programming problems in different languages. It's far less fancy-looking than the red-green table, but hey – it's a complex world we live in, and proper information takes bandwidth.

January 3, 2007 В· Jouni Heikniemi В· Comments Closed
Posted in: General