THE MEMORY OF THE CITY
log in
Samantics
Verbosity as a metric of language power
2012-01-22 00:26:12

Verbosity as a metric of language power

If it takes fewer than n lines to accomplish a given task in a given programming language, that language is too powerful and high-level for the purpose at hand. For the sake of convenience, we will ignore anomalously high program lengths caused by specialized and non-imperative languages, and strip out declarations and definitions from Java.

Exercise to the reader: find n, as well as a suitable maximum line length. I'm guessing n can't be lower than twenty. All problems are invited, with the understanding that there is a floor to how simple our languages can get. We could also have a counterpart: any language that takes more than m lines to accomplish a given task is insufficiently powerful. This is less of a good idea, since tasks can be arbitrarily large, but not arbitrarily small.

Treating this notion as a moral value might help smooth over feathers between low- and high- level programmers, and keep intermediate and lower level languages in higher use.

I wonder how many times others have thought up the same idea.
Samantics comment   8452.136 tgc / 2012.056 ce