A short explanation to start with: programming languages which are used to develop computer applications have two aspects: the programming language’s keywords (its built-in capabilities) and the instructions defined by the developer. A typical example of this would be
– more instructions would be written here –
In this example function is a keyword which is defined by the programming language being used, whereas the name used to reference this function, in this case DoSomething, is the remit of the developer.
The more programming code that you look through the more you become aware that programming languages are – as far as this writer is aware – almost always defined in English. Furthermore, developers’ own code is also frequently written in English, even when they are not native English speakers. And if not entirely in English then a bizarre mish-mash of English and another language.
Back in the 1940s and 1950s, the first programmable computers were being built in the UK and the USA, which explains why English became ingrained. Here is a list of the 10 most common languages currently in use and the country in which the language originated.
C – USA
Java – USA
PHP – Canada
C++ – USA
Python – Netherlands
Shell – [not a single, distinct language but is universally English]
Ruby – Japan
Objective-C – USA
C# – USA
So only two out of the 10 most common languages originate outside North America. However, according to Wikipedia, something like 40% of all programming languages were developed in a country whose first language is English.
Doubtless, there are programmers who earn a living by working entirely in a non-English programming language, though such jobs will be more specialised and it is unlikely that such specialist professionals would be unfamiliar with any of the 10 most common languages – particularly as the C programming language has tended to serve as a blueprint for most later languages.
Regardless of the language behind the programming language’s keywords, the programmer is free to type their part in whichever language they choose, and this is where things get a little blurry. As this Stack Exchange question shows, programmers have a multitude of reasons for mixing – to various extents – their native language with English in their programming code. But what’s interesting about the responses to that StackExchange post is that no-one reports writing code entirely in their own non-English language.
The most common reason appears to come down to international collaboration. Other reasons include convention (programmers tend to gravitate towards following conventions), right-to-left mother tongue (the 10 most common programming languages are LTR), the fact that most programming books are written in English (although this could be a cyclical argument) and quite simply, the feeling that English is optimal for the concise expression concomitant with writing programming code.
One global culture
Above all else, programming is part of modern and global business. For perhaps the same reasons as air traffic communication, English is currently the default international language. In another 50 years we may find ourselves programming computers in Mandarin. One can’t help but wonder where computing would be today if the first and most influential programming languages had been written in a more difficult language like Russian or Polish.