English as a language for programming

Programmers write programs in computer languages but the comments and identifiers (which are important, but not meaningful to the computer) are written in a human language.

Usually this human language is English, but not always - I have occasionally run across a pieces of source code in French, German and Hebrew. I guess it makes sense for a programmer to write code in their first language if they are not expecting to collaborate with someone who doesn't speak that language (or if that piece of code is very specific to that language - like a natural language parser).

On the other hand, it seems kind of short-sighted to write a program in anything other than English these days. There can't be many programmers who don't speak some amount of English (since most of the technical information they need to read is written in English), and it seems likely that all but the most obscure hobby programs will eventually be examined or modified by someone who doesn't speak the first language of the original author (if that language isn't English).

There are other advantages to standardizing on English - a common vocabulary can be developed for particular programming constructs which makes programs easier to understand for those who are not familiar with their internal workings. The aim is, of course, that any programmer should be able to understand and work on any program.

That there is a particular subset of the English language that is used by programmers is already evident to some extent - I think it will be interesting in the next few years and decades to see how this subset solidifies into a sub-language in its own right.

I should point out that I'm not advocating putting legal or arbitrary technical barriers to prevent programs being written in other languages - more that it might be useful to have tools which can help out with programming tasks for programs written in English.

Having said all that I think that there will in years to come, a higher proportion of programming will be done to solve particular one-off problems rather than create lasting programs - there's no reason why these throw-away programs shouldn't be in languages other than English. Tool support for this can be very minimal, though - perhaps just treating the UTF-8 bytes 0x80-0xbf and 0xc2-0xf4 as alphabetic characters and the sequence 0xef, 0xbb, 0xbf as whitespace.

Leave a Reply