archives

Language comparison experiment

Another quiet time post...

I am considering a language comparison experiment that will take a bit of time, and would be interested in any comments or suggestions that might make the results more interesting/significant. This is primarily for my own interest.

There don't seem to be any studies where the same piece of software has been implemented twice, in two different languages and paradigms by the same person/people. I plan to do this, writing a smallish, but non-trivial program twice from scratch.

Such a comparison will of course quite subjective. My intention is to keep a journal tracking how easily various features are added. In order to be more even handed, I will build the software according to a staged plan, and will do each stage in both implementations, alternating which I do first. Other than trivial metrics (line counts, time taken etc), the main results will be my opinions and judgements: on such things as the relative effort required for each stage, and the my perceived quality of the results. Nevertheless, I'm quite interested in what conclusions, if any, I reach.

I'm primarily interested in a functional versus objected-oriented comparison. Hence, I probably should choose two implementations where this is the only difference. (two implementations in ocaml would be a possibility). However, another driver is that the experiment remain interesting long enough to actually achieve something! Hence, I plan to do an implementation in my two preferred languages, python and haskell. These two languages differ in many other aspects: dynamic versus static typing; interpreted versus compiled; etc.

Finally, specific languages are better suited to certain types of tasks. I've got a couple of ideas here, and don't want to select a task whose implementation is obvious from the the description/plan. I'm tempted by a GUI application using the wxWidgets framework, since it is supported in both languages.