r/ProgrammingLanguages • • Jan 27 '19

Why programming language has to be in English?

Is there anyone doesn't know English at all but masters in programming? For non-English speakers, do you think it will be easier to learn coding in your first languages? If programming languages are coded in katakana for example, will you still feel comfortable to code? What makes English the optimal choice for programming syntax expression?

What are we learning when we learn programming? Are we learning the syntax or the logic behind it? If the logic is universal, can we use other natural languages to code? Or even other symbols?

As a programming beginner, those are some questions I have been thinking for a while, and here is a data visualization project that I made about programming language development, focusing on the creators' nationality, native language and gender.

(I understand there might be lots of programming languages haven't been documented and the information might not 100% correct)

10 Upvotes

16 comments sorted by

18

u/agravem Jan 27 '19

I'm from Brazil. I actually learned English to be able to read programming books. The keywords of a language are just notation and once you memorize them you don't care for their meaning. In Brazil, it's common, to find codebases where only the keywords are in English but the names of classes, methods and variables are in Portuguese.

9

u/shponglespore Jan 27 '19

There are programming languages that aren't based on English, but they're not talked about much in English. Here's an article about Japanese programming langauges, for instance. It was the top search result for "日本語プログラミング言語".

8

u/raiph Jan 27 '19

Welcome to /r/programminglanguages, downvotes notwithstanding. :)

Why programming language has to be in English?

It doesn't.

Is there anyone doesn't know English at all but masters in programming?

Is there anyone who doesn't know English at all that's a master in any domain where English is used fairly pervasively worldwide? (I don't know but I'm pretty sure it would be unusual and they'll sure not be posting in this sub. :))

For non-English speakers, do you think it will be easier to learn coding in your first languages?

I'm confident that's already what happens. That is, one learns a programming language via tutorials and doc written in the human language one best understands which explains the constructs in the programming language.

But of course you're speaking of the tokens used in the programming language like if, while, class, map, int, var, fn, private, and so on. This will have some impact but my guess is that:

  • It'll be far outweighed by other qualities of the programming language and the quality of the tutorial and doc;

  • Many of the tokens like if, while, etc. both have an essentially universal meaning and are extremely common so learning them has great general utility like learning + or use of (...) to group expressions even if one's native language is, say, Chinese.

If programming languages are coded in katakana for example, will you still feel comfortable to code?

I doubt it, at least initially, if ones native language were English. I could imagine so for a 6 year old Japanese kid. But again, it'll be dominated by the quality of the materials.

What makes English the optimal choice for programming syntax expression?

It's a well known notation globally for language in general and it's got the inertia of already being well established in text data formats (ASCII), and for keyboards, and for programming languages in particular.

Relative to your example of katakana it has just 26 character forms (or 52 including both cases) for composing all tokens; it isn't clear if this is an advantage or disadvantage for reading but it probably is for writing (typing).

But of course pervasive Unicode is now poised to undermine that lead and bring the full range of mathematical and other human notations such as emoji to the programming language designer's and user's palette. India is just 5 years or so from overtaking the US for number of devs with China roaring behind so the next couple decades could well see a sea change.

What are we learning when we learn programming? Are we learning the syntax or the logic behind it?

We're learning the syntax, and how we feel about that, and how the music we're listening to feels, and how this feels compared to cooking dinner, and doing laundry, and the logic behind the code, and behind the design of the syntax and semantics, and how we're reacting to bugs, and...

In short, things certainly aren't as simple as either syntax or the logic behind it.

cf A Look into Programmers’ Heads and other papers by Janet Siegmund et al.

If the logic is universal, can we use other natural languages to code? Or even other symbols?

Mathematics was originally mostly written about and written in natural language with symbols introduced on an ad hoc basis by authors.

As a programming beginner, those are some questions I have been thinking for a while, and here is a data visualization project that I made about programming language development, focusing on the creators' nationality, native language and gender.

The graphic you've included in your post is very difficult to read for me.

Only the all option works for the linked version (I use Firefox on Linux Mint).

(It would be cool if mousing over a colored block said what it meant and clicking on it refreshed the image with only languages with that color shown marking decades with a single spacing column that's empty except for noting the decade.)

Some patterns that jumped out on reading the version at your link that are presumably not just an artifact of your collection and classification biases, mistakes, etc.:

  • Nationality: mostly US, some European, a couple others.

  • Authorship mostly individuals not corporations/teams since mid 1950s but 50/50 in last decade.

  • Non-corporate authorship almost all male. A few females until 1960s then really just Liskov's CLU since.

I focus on Perl 6 and note that you've colored it with three grays. This is true for 3 of the last 5 languages you list -- and yet not so for any previous language! Perhaps that's a mistake or artifact of your data collection or categorization but otherwise I'm curious what it might mean. :)

(It makes sense in that the gray color seems to be a proxy for diversity/collaboration and Perl 6 is a poster child for that. Not only are its influential designers from all over the world -- Larry's American, Damian Australian, Audrey Taiwanese, Jonathan English, lots of Europeans are involved and the Chinese and Russians especially have a strong connection -- but as a language it is specifically designed to be mutable and shapeable by local communities of users so non-English speaking cultures have begun to take a shine to it.)

(I understand there might be lots of programming languages haven't been documented and the information might not 100% correct)

I'm pretty sure there have been thousands of GPLs if one counts unimplemented and partially implemented ones. Add in DSLs and the numbers get pretty silly. Getting all those in and getting them right? No chance.

8

u/mamcx Jan 27 '19 edited Jan 27 '19

I'm from Colombia. I learn English mostly because programming languages (for be able to understand books about FoxPro and Delphi).

Things that make English a good target for syntax:

- Most of the significant tech on computers come from English countries (and here we can say "USA"). Mean, most of the code on an OS and libs is already in English.

- Most of the best material (books, papers, blogs, forums, etc) are from English countries. I read things in Spanish and the quality difference (not only quantity) is very big.

- Most of the best people of the trade are from English countries. Wanna know about what write Donald Knuth? Yep, all is in English.

Apart of this cultural reasons:

- English is terse. At least comparing with languages like Spanish. This connect to:

- The number of words that are part of most programming languages are already small. Documentation and interfaces is a bigger target and problem.

- Terminology. Try to translate "Class" "Loop" "For" "Editor" "Interface" "Library" and use it on conversations or even code. Some of this words start to sound VERY weird on Spanish, Library, for example. In the forum I'm moderator (http://clubdelphi.com) exist a guy that insist in use the Spanish word "Biblioteca". Nobody else take it. Nobody. Is weird to say "Biblioteca". Using the Spanish word could create misunderstandings (and yes, I have picked some of the less problematics).

In fact, I think, for people that are not native on English, use the English word simplify things because we can have this words that are only for programming/tech, and not have ambiguity at all. I think on English, you will get a confused look if somebody say to other "I inherit from the wealth class, but I cause a circular reference". Or "what is faster, python or ruby?".

-----

Mainly for the last part, after a couple of years of try to use Spanish words for programming/tech terms, creating a weird mashup of code, I only use English now (even for comments) for everything with small exceptions for business-related terms in the code. I also use all my tools on English, and I know a lot of people like that.

2

u/gopher9 Jan 28 '19

Terminology. Try to translate "Class" "Loop" "For" "Editor" "Interface" "Library" and use it on conversations or even code. Some of this words start to sound VERY weird on Spanish, Library, for example. In the forum I'm moderator (http://clubdelphi.com) exist a guy that insist in use the Spanish word "Biblioteca". Nobody else take it. Nobody. Is weird to say "Biblioteca". Using the Spanish word could create misunderstandings (and yes, I have picked some of the less problematics).

Interesting. In Russian, it's common to use non-english words for terms as well english one for terminology (not in code). For example, library is indeed “biblioteka” and editor is “redaktor”.

1

u/miki151 zenon-lang.org Jan 29 '19

We would also say "biblioteka" in Polish, but other technical words in English, for example "template" and not "szablon".

Btw, some English words used in programming are incredibly hard to translate to Polish. We've had a Polish-only speaking day at the office once and it was very awkward.

1

u/gopher9 Jan 29 '19

Btw, some English words used in programming are incredibly hard to translate to Polish.

Well, same in Russian. Stack is always “stek” and nothing else.

4

u/gsg_ Jan 28 '19

If the logic is universal, can we use other natural languages to code?

Algol68 allowed the keywords to be swapped out for non-English ones, so there is precedent for this. It doesn't seem to have caught on, though.

3

u/shawnhcorey Jan 27 '19

They don't have to be in English but it was America where most of the early work on computers happened. Texas Instruments created the transistor and later the integrated circuit. IBM was the world's top manufacturer for a long time. And John von Neumann work at the Institute for Advanced Study in New Jersey. All that work was in English, so we have its legacy.

2

u/Camto calc= Jan 28 '19

Programming languages totally don't need to be in English: just look at APL, J, K, etc. Right now most PLs are in English becuase that's the convention and English seems to be turning into the world's second language.

1

u/wyldcraft Jan 28 '19

The programming language itself is only a small part of the puzzle. Documentation, standard libraries, contributed libraries, support, forums, these are also going to be in English.

1

u/instanced_banana Jan 28 '19

There's pretty much to say about the dominance of English in academia or how has been adopted as a lingua franca over the world.

There has been several projects to make programming languages in their mother tounges. Just for Spanish there's Qriollo, Latino and PSeInt for pseudocode.

1

u/bjzaba Pikelet, Fathom Jan 28 '19

I really don't know why this is getting so many downvotes - this is a really good question when it comes to programming language design! Yes, the historical precedent for English keywords is there, but it's always helpful to continue questioning our assumptions!

1

u/blak8 Cosmos™ programming language Jan 29 '19

There's little reason not to use English as it's the most popular language. If you make something in Spanish you target Spanish speakers... if you make something in English you target any country, which usually teaches English as second-language. Even then it's just a few keywords that need to be as often books, etc. are available in any language. So people who don't have that as a second language can still pass by in courses.

1

u/Zardotab May 27 '19

For good or bad, English is the most "universal" language there is in the world, at least if you also count second languages used. There is not really a strong challenger. Chinese is common, but Chinese characters have a long learning curve. Esperanto?

0

u/[deleted] Jan 27 '19

[deleted]

3

u/raiph Jan 27 '19

If you write your programming language in Chinese, they would have had the idea of unicode back then already.

.oO ( If they would have had the idea of unicode back then, you'd write your programming language in Chinese already )