Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do there exist any compilers with localized versions of programming languages?

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.

like image 957
JohnFx Avatar asked Nov 13 '08 20:11

JohnFx


People also ask

Are compilers language specific?

Different languages have different compilers. Compiler is written in some other language not every time, for java the compiler is written in C.

Which programming languages use compilers?

Programming languages like JavaScript, Python, Ruby use interpreters. Programming languages like C, C++, Java use compilers.

Can you write a compiler in the same language?

If the compiler is written in the same language as the one it's compiling, the compiler is called self-hosting. If a language is new, then no compiler exists for it already, which means that its first compiler cannot be self-hosting (otherwise, how would that first compiler be compiled?).

Is there a universal compiler?

Universal Compiler allows you to quickly compile, build and run files. How Universal Compiler helps you in programming? After pressing `u file.


2 Answers

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...

like image 150
Jon Skeet Avatar answered Nov 15 '22 13:11

Jon Skeet


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.

like image 40
David Thornley Avatar answered Nov 15 '22 11:11

David Thornley