views:

515

answers:

18

I have often wondered why it is that non-English speaking programmers are forced to use a different language when programming when it would seem to be so easy to offer an IDE that could replace keywords with localized versions. Why can't the Germans use a "während..macht" loop?

Do programmers in Japan, Germany, France, Spain, Botswana just make extensive use of macros/define statements to make life more tolerable or do they just get used to the functional significance of print, if, then, while, do, begin, end, var, double, function, etc?

Perhaps the increased use of frameworks (J2EE/.NET) makes this more complicated, but it still seems worthwhile. On the other hand, if Klingon became the de-facto programming language in the US I'd probably regret suggesting this.

+11  A: 

In most programming languages, keywords are reserved, so they can't be used for variable names etc.

Now suppose the keywords changed every time you changed culture - code written in one culture couldn't be ported to another without changing identifiers. Ick. Furthermore, when anyone copied their code onto a question forum like this, we'd no longer be speaking the same language, as it were.

There are distinct advantages to only having one culture in the programming language itself...

Jon Skeet
Great point. I hadn't considered the identifiers issue. I guess I should just consider myself lucky that programming was invented in the same language that I grew up with. Would be a bear to learn programming if they keywords were meaningless strings of characters!
JohnFx
"I guess I should just consider myself lucky that programming was invented in the same language that I grew up with".I doesn't matter that much, programming it's not English, it's computer language, it merely uses English words. Math and logic are universal... so is programming.
Pop Catalin
@Pop: I take your point, but it really helps to be able to communicate very clearly, and that takes a certain amount of mastery in the language. I expect some/many users of SO are non-native English speakers - and that's *bound* to make it harder for them to get their points across.
Jon Skeet
@Jon Skeet - I can give so many examples of non native English speakers that are great programmers, and this fact didn't seem to affect them as programmers:Bjarne Stroustrup, Edsger Dijkstra, David Heinemeier Hansson, Anders Hejlsberg, Linus Torvalds, Miguel de Icaza, Jerry Yang, Andrei Alexandrescu
Pop Catalin
learning English isn't hard at all compared to being a great programmer, or mathematician, or physicist ...
Pop Catalin
@Pop: Beethoven was deaf, but it still helps *most* musicians to be able to hear, doesn't it?
Jon Skeet
+3  A: 

No! Never use the "localization" for you sources. English is de-facto standard for the programming and it helps a lot and makes this world a little better.

The code should be portable and comprehensible to everybody (when possible), localization would kill this possibility.

I speak Russian, Italian and a little bit of English, but I've used anything else but English in my job.

andy.gurin
+17  A: 

This sort of thing isn't unique to computer languages. All the control words for music are in Italian (andante, allegro, crescendo, etc.). This has worked well for a long time.

Besides, it allows programs to be shared more easily. Suppose you were trying to integrate a function from a Finnish programmer into a module in French, and wanted to send it for further integration to your Australian colleague.

David Thornley
+1  A: 

There is a development language in France which is called WinDev where all the code is entirely french localized.

labilbe
I have seen this. I worked for a company which was own by a french corporation, and they developed software in WinDev. Talk about another barrier when they tried to explain how some of their system worked and gave us printouts of the sourcecode...
jishi
To be honest I don't like this language. My brother is currently using a lot. It's a good language to develop fast but you feel quickly blocked when you try to do custom things.
labilbe
A: 

This is the same as air traffic control. It's been pretty much standardized in English. While that may make flying slightly more difficult if your native language isn't English, it's not too difficult to learn the specific subset of English necessary to get the job done... but could you imagine what would happen if pilots could just try and speak whatever language they were most comfortable with to the controllers... and the controllers could respond in whatever language they liked most? I certainly wouldn't fly internationally anymore :)

Jason Coco
A: 

In old (really old) Word version you would write your macro's in WordBasic. The WordBasic was localized.

GvS
+2  A: 

The French (and, IIRC, German and some other languages) version of Office once has a localized version of VBA.

They pulled it off, because it was a very bad idea! It is OK for casual users, making occasional use of macros, but as soon as you start searching information on Internet, want to share your code, etc., it is a nightmare. Not to mention opening a French worksheet in a Spanish Excel... (although I suppose they saved bytecode, not literals - so say running a German macro copied somewhere on a French Excel).

VB (and some other languages, like Lua) allows to use identifiers with accents, etc. I recall I used in intensively a long time ago. It looks odd now, and again, it makes very hard to share code.
Similarly, I am uneasy when I see code with Spanish or Chinese comments...

For the record, in the time of 8bit computers, a French computer (TO8) has a French version of Basic: instead of WHILE ... WEND, we had FAIRE ... JUSQUA (or something similar).

Anyway, such localized computer languages are quite scarce now... For better or for worse, English is the lingua franca of computer science. At least it is not the hardest language to learn. And the vocabulary of most languages (at least the keyword set) is quite limited.

The only problem is when we try to teach programming to young people not knowing English, but they learn fast.

PhiLho
A: 

No, and there really can't be. If you take a C compiler, for example, and localize the keywords into a different language, you will have a perfectly viable programming language but it is, by definition, no longer a C compiler.

C may have keywords like if and for which are obviously derived from English, but they are not English keywords, they are C keywords.

That being said, I have often wondered why we haven't seen programming languages based on other human languages. Are they just not that well known?

Ferruccio
+1  A: 

Not a programming language per se, but Microsoft Excel is known for its function names to be localized. Luckily opening an Excel sheet in a different language version does not break your formulas as they get translated.

petr k.
Yep, I cringe every time I have to do something in excel, writing things like SI() instead of IF() (I speak spanish).It's awful, awful and painful. Be careful what you wish for.
Daniel Magliola
A: 

I'd be surprised if there weren't a Chinese-localized clone of the open version of several languages. Especially gcc/g++. They're big enough to have their own ecosystem around it and you really wouldn't have much if any collision between chinese and english identifiers.

Considering that chinese written languages differ so fundamentally from western languages, I'll be even more surprised if there isn't a pure-chinese language with no western equivalent that takes advantage of those differences.

Joel Coehoorn
A: 

The Brazilians who created Lua used English keywords like if and while. The French who worked on ML also used English keywords. Stroustrup, Guido and Linus all come from non-English countries (although I believe they all learned English at a young age). And you can't forget Matz's work on Ruby.

I don't want to be snobbish, but English is the closest thing programmers have to a Lingua Franca.

Max Lybbert
+1  A: 

In some cases, keywords aren't even English (though they may vaguely resemble English words): car, cdr, and cons from Lisp; elsif in Perl; printf, fgets, sscanf, and many more from C. I think most languages have at least some keywords that aren't localized even for English speakers.

Keywords belong to the programming language, not the programmer's (spoken) language.

Bruce Alderman
A: 

When I first did Applescript that was localised, don't know if it is still true.

Adrian
A: 

When I was a kid, there was a version of the Logo programming language (interpreted) in Hebrew. I vaguely remember a faux-BASIC in the same language.

These were horrible to use though because letters are written RTL and numbers and symbols were written LTR, and the old ASCII based PCs/Apples couldn't really handle that kind of a beating.

Uri
A: 

I pray I have seen a program written in MS Visual Basic 5 or 6 with russian keywords!

Sergey Borodavkin
A: 
plan9assembler
A: 

I found one!

Lexico.NET: Lexico is a Spanish language object-oriented educational programming language based on the .NET Framework.

JohnFx