Slashdot Mirror


Non-English Programming Languages?

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?"

4 of 191 comments (clear)

  1. What do you want, universe? by Michael.Forman · · Score: 4, Interesting

    Klingon Var'aq.

    Example:
    Name: hello, world
    Dialect: English
    Version: 5 June 2000
    Comments: Not the canonical var'aq "hello, world"; actually prints "What do you want, universe?" in Klingon

    ~ nuqneH { ~ 'u' ~ nuqneH disp disp } name
    nuqneH

    Michael.
    --
    Linux : Mac :: VW : Mercedes
  2. Re:Translated Visual Basic by Anonymous Coward · · Score: 3, Interesting

    and of course totally incompatible with other versions...

    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.

  3. C ? by noselasd · · Score: 5, Interesting

    "#define" is your friend.(enemy..)

    #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;
    }

  4. Perligata by babbage · · Score: 3, Interesting

    How does Latin Perl sound to you?

    The Sieve of Eratosthenes is one of oldest well-known algorithms. As the better part of Roman culture was ``borrowed'' from the Greeks, it is perhaps fitting that the first ever Perligata program should be as well:

    #! /usr/local/bin/perl -w
    use Lingua::Romana::Perligata;
    maximum inquementum tum biguttam egresso scribe.
    meo maximo vestibulo perlegamentum da.
    da duo tum maximum conscribementa meis listis.
    dum listis decapitamentum damentum nexto
    fac sic
    nextum tum novumversum scribe egresso.
    lista sic hoc recidementum nextum cis vannementa da listis.
    cis.

    The use Lingua::Romana::Perligata statement causes the remainder of the program to be translated into the following Perl:

    print STDOUT 'maximum:';
    my $maxim = <STDIN>;
    my (@list) = (2..$maxim);
    while ($next = shift @list)
    {
    print STDOUT $next, "\n";
    @list = grep {$_ % $next} @list;
    }

    Note in the very last Perligata statement (lista sic hoc...da listis) that the use of inflexion distinguishes the @list that is grep'ed (lista) from the @list that is assigned to (listis), even though each is at the "wrong'' end of the statement, compared with the Perl version.

    And you too can do this !

    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 at run time. There are issues to consider, 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 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