The first programming language I ever learned was called BASIC. This is ancient history now but back when I was a kid, BASIC was the gateway drug for any aspiring computer geek. As a programming language, BASIC was quite, well, basic – it consisted of a small number of keywords like DATA, READ, LET and PRINT (yes, you were supposed to write them in uppercase), you had to number your lines (which you were recommended to do in increments of 10 so you could insert additional lines later) and I’m not sure if it could even do loops. If it could, it probably had to be done with the GOTO command followed by a line number, which even back then had the elegance of a bucket of sludge.
I’m not saying all this to reminisce about prehistoric programming languages, though. The point is, I knew BASIC before I knew English. When I finally started studying English in secondary school, it didn’t feel so strange because, helpfully, the keywords were the same. I was delighted to discover that the English for PRINT is “print”, the English for READ is “read” – just like BASIC! Constructing a basic (!) sentence in English felt like constructing a line of programming code.
This is the complete opposite of how it must have been for kids of my age in English-speaking countries. The reason why pedagogical programming languages like BASIC were so popular with bespectacled kids was because they were deliberately designed to resemble English. Many kids found programming easy because they already knew English. I, on the other hand, found English easy because I already knew programming. Either way, it worked.
Of course, the parallels between programming languages and natural languages are deeper than just pedagogical usefulness. If you’ve studied formal linguistics, you must have come across the observation that formal grammars (including regular grammars and regular expressions, finite-state grammars and stuff like that), even though they were originally invented as an attempt to describe natural languages, are infinitely more useful in parsing and compiling programming languages. But that’s not what I want to talk about now. The deep spiritual parallels between computer languages and human languages don’t interest me now. Instead, I want to talk about some fairly superficial similarities between computer languages and one particular human language: English.
Every programming language has a vocabulary of keywords and those almost always come from English. This was the case with BASIC and it still is the case today in modern “industrial-strength” programming languages like Java and C#. Even declarative and mark-up languages like HTML and XSLT take their vocabulary from English. Query languages like SQL also take their vocabulary from English. The recent rise in demand for agile and functional programming has spawned a lot of new programming languages and those, again, tend to take their vocabulary from English. Has anyone noticed how incredibly monocultural, arbitrary and unnecessary this is?
In theory, the keywords of a programming language can come from any old natural language or from none at all. Previously invented formal notations, such as those of algebra and chemistry, have tended to use abstract symbols that are largely independent of any natural language. But in computer languages, it seems an unquestioned convention that the vocabulary of symbols must be borrowed from a natural language, and that this language must be English.
English is the default choice for two reasons, one cultural and one linguistic. The cultural reason is that, since the beginning of IT history, English has been the working language of those who drive innovation in the field. The linguistic reason is that, by pure coincidence (or perhaps not?), English has an extremely uncomplicated morphology and syntax which lends itself easily to the terseness required of a programming language.
Neither of these reasons is likely to go away any time soon, and so anglophone computer languages are likely to stay with us for the foreseeable future. That has not stopped certain people from experimenting with programming languages that take their vocabulary from elsewhere. When I was a teenager, at around the same time BASIC was all the rage, another home-made programming language called Karel was being promoted as an alternative for kids who wanted to learn programming. Karel takes its name from the Czech writer Karel Čapek who is credited with popularizing (although not inventing) the word robot. In Karel, you programmed a robot using keywords from Czech, not English. The theory was that kids will find programming easier to learn if they don’t have to grapple with the additional obstacle of keywords in an unfamiliar language. Karel never really took off though, and it was BASIC that became the gateway drug, even for non-English speaking teenagers. There’d be enough material there for someone’s doctoral thesis in sociolinguistics to explain why!
There just doesn’t seem to exist an overwhelming reason why anybody should want to adopt a non-anglophone programming language. In other areas of computing, areas where non-programming users are involved, the English-centric origins of the industry have been, with more or less success, hidden from view by the software globalization and localization industry. This has been driven by consumer demand. There is no such demand from programmers. And so, for many future generations of bespectacled geeky kids, the first programming language they learn will be a derivative of English, like it was once for me.
P. S. The picture accompanying this article is a picture of me holding a copy of what had once been my first programming textbook. A textbook of BASIC, of course. I found it last summer by accident in a used-book sale in my family’s home town. I remember how excited I had been to read it as a kid, learning to program years before I ever laid hands on an actual computer. For all I know this might even be the very copy I used to own, as my mother had been clearing out my “childhood junk” (her terminology, not mine) that summer and had donated some old books to the local second-hand bookshop. Rediscovering it there is what inspired me to write this article.