Skip navigation

What makes one grammar better than the other?

To think about programming languages helps answering this question, because human languages are shielded by anti-ethnocentric bias (if such a thing exists). What i mean is that you cannot say that Spanish is a “better language” than Chinese or anything like that.

Nevertheless, languages are believed to influence the way populations think. If this is so, there must be some way to compare languages, at least in as much as they cause different behaviors.

But this questioning is fruitless in relation to human languages. Not only because of some ethnographic protectionism, but also because human languages are too complex to analyze in this way.

That’s why computer languages might help us understand language better.

So, what makes a programming language better? That is a long and heated discussion. The simple (and somewhat naive) answer is that the best programming language is the one which produces better programs.

The problem with this proposition is the same with saying that the best language is the one which causes the better behavior. There aren’t useful specifications for what are better behavior or better programs.

But there are some other criteria for comparing programming languages. One of them is expressiveness. How much can some language express? And also: how much does the language makes it easy to express?

The classic example is that anything that one can express in Ruby one can also express in Assembly, but it is much easier to do so in the former than the latter. There are some constructs that can be expressed in a interpreted language that in order to be emulated in a compiled language require a whole set of abstractions (like generating code on the go).

This form of thinking can be brought over to human languages more easily, but not much. For example, it is said that German is more expressive in philosophical matters, and that french in sociological ones. But are they really? And why? Can such claims stand a throughout scrutiny?

Yet another way to compare languages is code density: how much content is packed with the same amount of utterances (letters, phrases, bits…)? This is easier to measure, but it is not safe to bet in the language with more density always. The classical example is the RISC vs CISC debate, where RISC has proved to be almost always better despite having less density.

Maybe even density is a bad thing. Wittgenstein’s logic, for example, discarded density altogether in favor of absolute clarity.

Clarity as criteria for judging a language is an interesting one. It would seem that every programming language is absolutely clear, for all of them in the end become binary instructions (and binary instructions cannot be “sort of”). But this is not so.

Take Bash, for instance. There are some constructs that behave in a certain way in some cases and in another way in other cases. That is, some Bash instructions will have different consequences in different contexts. They are translatable to binary instructions but they are not clear.

The problem with this argument is that it assumes a ontological difference between the human reader and the machine reader, and we should constrain ourselves to semantic differences — as we are discussing semantics.

I believe that if one could specify clarity in semantic terms, without referring to “meaning” in transcendental terms that require some sort of soul or conscience — what Derridá would call theology — i believe that if one could do it then we would have a useful way to compare languages.

One Comment

  1. That’s a fascinating way to look at languages! Thank you for posting that!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: