notes-computer-jasper-rosettaLanguageComparisonMethodology

How to compare programming languages?

Traditionally programming languages are compared by popularity, by general opinion (e.g. someone says "I find it helps me get stuff done without cruft"), by paradigm, and by features. The last of these, features, is more objective than the rest, and it talks of specific capabilities than the language has (often these features not formally defined, but usually they could be, in theory). However, even with features, the subjectivity returns after the features of each language have been enumerated, in arguments about which features are more important.

I would like to present an alternative, an alternative which I feel could serve sociologically as a mechanism for competition between programming languages in a similar way to how experiment serves as a mechanism for competition between theories in science (although not as as definitively since it is more subjective than an experiment). I call this a Rosetta comparison. It is subjective. It has six parts:

The rationale for the above is that debates about particular pieces of code are more concrete then debates about which features are more important, even though both are subjective. I opine that most 'features' fall into the first four categories, e.g. either they are constructs that lead to more concise or more clear code, or they are constraints that discourage ugly code, or they are constructs or constraints that discourage subtly incorrect code, or they are constructs or constraints that encourage easily extensible code. Therefore, in those cases, instead of discussing the features themselves, we may discuss concrete code examples.

For example, if someone thinks that macros are bad because they make code less readable and because they discourage communal standardization around frameworks, at least the first of these concerns could be expressed by giving an anti-Rosetta challenge in which they present some code with macros which is believable and yet less clear than code in another language with macros forbidden.

This methodology also allows for showing off the synergy between features in a language, rather than considering each feature in isolation.

I recognize that programming language experts can easily call to mind examples of when a given feature would be helpful or hurtful and that for discussions between them, Rossetta comparions would often be of little use. I present this instead as both a mechanism of combat between languages in a way that non-programming language experts can easily understand, and that is more productive than opinions like 'i find language X is less crufty', and also as a methodology for language development, as a way of concretely looking for shortcomings of the current version of the language being designed, as compared to extant languages. It is also interesting in philosophical terms, for instance, when we say that one language is more concise and clear than another, we really mean that for a substantial portion of all conceivable, believable programs, that language would in theory win a Rosetta challenge against the other for the tasks of expressing these programs; I opine that many assertions about utility of a language feature really refer in a hypothetical way to hypothetical Rosetta compairisons over a large hypothetical set of believable tasks.

Note that the Rosetta comparison method does not address the tradeoff between clarity and conciseness.