Skip to content

6.15 Programming is Greek to me... Literally

Claude Roux edited this page Oct 6, 2022 · 10 revisions

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 at the time 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 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 result is quite unsettling. We can certainly detect the structure of a computer program in these lines of code, but the result is still pretty obscure for a non Greek speaker. I think it serves quite nicely as an example of what a Korean or a Japanese who is not used to the Latin alphabet can feel when he starts programming.

Clone this wiki locally