Non-English Programming Languages? 191
jjohnson asks: "As a coder I've been exposed to a lot of programming languages, big and small, and they're all in (pseudo) English, reflecting their invention and development in English speaking countries (or to gain traction in English speaking countries, such as Ruby). Of course, there's no reason a programming language couldn't be developed in Russian, using a cyrillic character set; or Chinese, using kanji; or Japanese, using hiragana. All three of those nations have big/advanced enough developer communities to justify the development of native-tongue programming languages, which have the obvious benefit of not requiring their developers to learn/code in a foreign language. What non-English programming languages exist, and how do they compare?"
What do you want, universe? (Score:5, Interesting)
Klingon Var'aq [geocities.com].
Example:
Michael. [michael-forman.com]
Re:Swedish Chef BASIC - optimized! (Score:3, Interesting)
20 GOTO 10
See - 1/3 reduction in code!
Re:Translated Visual Basic (Score:3, Interesting)
That's not true - it's totally compatible, and in fact even translates itself. If you make your Excel document using a French version of Office, and then open the same document in an English version, all the code has miraculously become the standard VBA that we all know and (possibly) love.
Translated Hebrew Basic (Score:2, Interesting)
5 TO 1 = X FOR 10
"HELLO" PRINT 20
NEXT 30
(sorry for lack of right-alignment - I couldn't get this to work in the comment window. Just assume the lines above are right aligned).
substitute the regular keywords with the equivalent hebrew words in a hebrew font, and you get the idea.
Notice that unlike the keywords here which are left-to-right, the hebrew keywords are actually read right-to-left, so the only thing on the line read left-to-right are the numbers.
In Russian (Score:3, Interesting)
Just the same I am generally having big problems with localized Excel -- I once saw my mothers excel worksheet (Russian version) and could not figure out half of the formulas!
C ? (Score:5, Interesting)
#define if hvis
#define do gjør
#define while sålenge
#define return returner
#define void ingenting
#define char karakter
#define const konstant
typedef int tall;
tall lengde(konstant karakter *p){
tall i = 0;
sålenge(*p){
i++;
p++;
}
returner i;
}
Re:None English programming languages? (Score:3, Interesting)
Perhaps had Grace Hopper been German she would have coined the phrase 'Computerwanze' instead of 'Computer Bug'.
Re:Not too difficult... (Score:3, Interesting)
Actually as a side project in college I wrote a Pascal to C compiler (wrote it in Pascal) as a hack to get my way through all those pesky C coding homework problems in a hurry. I was a long time Pascal coder and fairly new to C, didn't particularly care for the syntax of C. I would do the C homework in Pascal, run it rhrough my pre-processor to convert the Pascal versions of the homework to C, compile the output in TurboC and Voila! I was done in half the time.
I have hence learned to love C, for the record.
I guess someone could do the same thing, take all the keywords and translate them, write your own 'language' using those, and write a YourLanguage to C compiler to pre-process the source code before compiling it as regular C in your C compiler.
Re:Swedish Chef BASIC - optimized! (Score:1, Interesting)
10 SKRIV "BORK!"
20 HOPPATILL 10
Perligata (Score:4, Interesting)
How does Latin Perl [monash.edu.au] sound to you?
And you too can do this ! [cpan.org]
Actually, Perligata is more serious than it may seem.
On one level, it uses Latin -- which packs much of the meaning of sentences into word endings rather than word order -- as a case study for a programming language that doesn't enforce a particular mandatory word order on language statements. That is, in English, "boy chases dog" has a much different meaning than "dog chases boy", but in Latin you could write it either way because the inflection on the words controls the meaning. Likewise, in most programming languages, x = y has a different meaning than y = x, but if you had a language that was agnostic about "sentence order" then you could write it either way. Using Latin allowed him to demonstrate this in practice.
Why would anyone care? Well, when Perligata was written, Perl6 was just starting to be considered, and Damian was wondering what core concepts had to be maintained and which were open to revision. Among the assumptions he wanted to consider was word order, and Perligata is a case study in how you can throw it out the window without breaking anything.
Coming down to Earth, this technique could have other applications as well. For example, the techniques used in Perligata could be applied in a source filter to convert VBScript to Perl [mail-archive.com] at run time. There are issues to consider [mail-archive.com], of course, but it could work, if you wanted it badly enough. To cite a real example, one of the core plans for Perl6 is that it should be able to run existing Perl5 code, and the techniques demonstrated in Perligata will probably be used to make that possible.
Likewise, the object framework for Perl 6 [perl.com] is very flexible, allowing people to hand-roll almost any style of OO programming they are comfortable with. If you pair this with things like the built in Unicode support (and, allegedly, no obstacles to using Unicode symbols directly in Perl6 code for things like variables, functions, overridden operators, etc), there's no reason why people couldn't prepare "localized" versions of Perl6. It'll be interesting to see if this ends up happening, but I wouldn't be surprised at all if
Re:Perl ... (Score:3, Interesting)
Completely without letters? Slacker. How about a method for removing all those unsightly printable characters [cpan.org]?
And if that's too much for you, and you just want to smoothe over all those confusing operators, you may want to have a look at Acme::DWIM [cpan.org], which just Does What I Mean:
Share and Enjoy! If you thought these were fun, thank Damian Conway [monash.edu.au] -- he's a veritable fountain of this kind of inspired Perl silliness.
Re:None English programming languages? (Score:3, Interesting)
As others have pointed out, Frankish (not to be confused with French) was a lingua franca. For several centuries, if you wanted to study the sciences or mathematics, you did it in Arabic (from whence came our numerals). Swahili has served a similar "common language" role in Africa, and I'm sure there are others from the pre-Columbian Americas, Asia, and other regions.
Plenty of 'em (Score:3, Interesting)
There have been, and continue to be, lots of linguae francae.
Unnecessary (Score:3, Interesting)
The 52 letters, 10 digits, and handful of special characters in ASCII are easy for them to both read and type on local keyboards, and keywords like "if" and "while" are already familiar to most Japanese older than about 10 or so.
I'm not saying they speak English well. In general, they don't. I'm saying that writing code in symbols composed of ASCII characters is so much easier than English and so much like other things they do in school that it just isn't a problem.
The same is true for Chinese and Koreans, and if it's barely a challenge for them, it's nothing for most other cultures.
By the way, I *have* seen a Japanese BASIC that used katakana keywords. It was apparently intended for 12 yr olds, but even they rejected it as no easier than ordinary BASIC.
Though there is a much stronger argument for local-language identifier names, the programming language itself doesn't need translated keywords.
Re:None English programming languages? (Score:3, Interesting)
Compare that to, say, Slavic languages -- you'd pretty much have to know all relevant "attributes" of each known word in a language to for sure use it correctly. Or even French or German -- you at least need to know gender of each word to use it correctly.
None of that nonsens in English -- making it possible to write Perl programs that can almost be read (yeah, I know, it can also be written in Perl in such a way that one may need a crypoanalytic to decipher the meaning). Or come up with languages like AppleScript that look almost like proper English.
That said, replacing tokens in a programming language grammar with word in a different language does not really constitute such a great achievement. What would have been a good example is the use of certain properties of some natural language that make it possible to use as a basis for an efficient programming language! I remember reading somewhere that there's been some hopw for Sanskrit to provide something like that -- yet my memory is to flaky to remember the details and reasons behind that... It was ling before the outsourcing plague, though (not that many Indians speak Sanskrit anyway).