6.15 Programming is Greek to me... Literally - naver/lispe GitHub Wiki

Programming Languages and English

Version française

I remember very well that time in January 1981, when I first got my hands on a computer. The machine came with a small booklet of about 50 pages, written in English, which included an exhaustive description of the Basic language.

But my knowledge of the language of Shakespeare was quite limited then, and I had some difficulty in interpreting many of the command descriptions.

What could a "pixel" be?

No dictionary at the time contained this kind of vocabulary, but fortunately for me, French magazines and books were available that provided the explanations and examples I needed to program my computer.

But this experience left me with a strange feeling, a kind of metaphysical questioning. For non-native speakers of English, the keywords in that language are interpreted as abstract symbols, as a kind of special arithmetic that is enriched with "verbs", according to the Latin sense, whose original meaning is lost in the arcane of computer science.

if x < 10:
   x = x * 2

When I read these lines of instructions, I immediately switch to a particular mode where they cease to be English and become something else: to become code.

For children who do not speak English, they must first translate these keywords, which they eventually interpret within the narrow confines of the programming language they are learning.

But what about a native speaker? How does an English-speaking child interpret these instructions when he reads them for the first time? Unlike the previous child, he does not have to translate these words, but he still has to give them a meaning that is specific to the computer language he is learning.

And for the other children, those who live in a different alphabet, the step must be even higher.

Greek

So we concocted with a Greek colleague, Nikolaos Lagos, a little experiment that we are submitting to you today. This article is a continuation of create your own language that I published some time ago.

We translated the grammar of our Basic to create a new language based on the Greek language and alphabet. It is now possible to write real programs in this alphabet.

This colleague, who speaks fluent French and English, has been working for years in computer science and is therefore used to designing programs in Python or Java. But there he was surprised to discover how natural this code seemed to him, as if the barriers of alphabet and language had dissolved.

The code is available here: hellenica.

For example, here is the factorial function written in this language:

συνάρτηση παραγοντικό(α)
   αν α <> 1 τότε
      α * παραγοντικό(α-1)
   αλλιώς
      1
   τέλοςαν
τέλοςσυνάρτησης

which can be contrasted with its English version also available:

function fact(a)
   if a <> 1 then
      a * fact(a-1)
   else
      1
   endif
endfunction

Distinguished Helenophones may have a problem with the choice of reserved words, but the whole experience is pretty fascinating. Indeed, the Latin alphabet is a distant descendant of the Greek alphabet, which leads the eye to wander over familiar forms without grasping their meaning. The structure of a computer program is there, but its understanding escapes us completely, we who do not speak or read Greek. I think that this makes it easier to understand what a Korean or a Japanese person who is not used to the Latin alphabet might feel when he starts programming.