views:

571

answers:

10

Every programming language I have ever seen has been based on the Latin alphabet, this is not surprising considering I live in Canada... But it only really makes sense that there would be programming languages based on other alphabets, or else bright computer scientists across the world would have to learn a new alphabet to go on in the field. I know for a fact that people in countries dominated by other alphabets develop languages based off the Latin alphabet (eg. Ruby from Japan), but just how common is it for programming languages to be based off of other alphabets like Arabic, or Cyrillic, or even writing systems which are not alphabetic but rather logographic in nature such as Japanese Kanji? Also are any of these languages in active widespread use, or are they mainly used as teaching tools? This is something that has bugged me since I started programming, and I have never run across someone who could think of a real answer.

+26  A: 

Have you seen Perl?

Ben Hoffstein
+1 for making my day!
Amarghosh
I stood up before I upvoted.
Arrieta
+2  A: 

Many languages allow Unicode identifiers. It's part of standard Java, and both g++ (though you have to use \uNNNN escapes) and MSVC++ allow them (see also this question) And some allow using #define (or maybe better) to rename control structures.

But in reality, people don't do this for the most part. See past questions such as Language of variable names?, Should all code be written in English?, etc.

Matthew Flaschen
You mentioned Java before I would. Note that the functional keywords are all in the section of unicode that maps to ASCII, but other names are not constrained by anything except the programmer's convention.
Edwin Buck
+21  A: 

APL is probably the most widely known. It even has a cool keyboard overlay (or was it a special keyboard you had to buy?):

image courtesy of Wikipedia

In the non-alphabetic category, we also have programming languages like LabVIEW, which is mostly graphical. (You can label objects, and you can still do string manipulation, so there's some textual content.) LabVIEW has been used in data acquisition and automation for years, but gained a bit of popularity when it became the default platform for Lego Mindstorms.

Bill the Lizard
You needed the cool typeball, also
mpez0
@mpez0: I'm getting kind of old, but even I can't imagine programming on a machine that requires a typeball. :)
Bill the Lizard
What was really cool was putting an APL typeball on a Selectric typewriter and watching it mess with people's minds :-)
Norman Ramsey
APL is an interesting example of a non linguistic programming language which relies on it's own special symbols (I'm assuming, I haven't seen symbols like that used elsewhere). This was something I hadn't really considered.
Jaxsun
@Bill the Lizard: Look up IBM 2741 Selectric Terminal. Also available on 1130 and 360 consoles.
mpez0
+1  A: 

Well, there's always APL. That has its own UNICODE characters, and I believe it used to require a special keyboard too.

Donal Fellows
APL's characters were invented around 30 years before Unicode. Unicode copied APL's characters for the same reason that Unicode copied other character sets, to make a unified character code.
Windows programmer
@Windows: Yes. So? You still can't do it with a conventional character set.
Donal Fellows
RTFQ (Read The Question): "Are there programming languages that rely on non-latin alphabets?" It did not ask about punctuation marks. Next, RTFA (Read The Answer): "That has its own UNICODE characters". UNICODE is irrelevant and I explained why.
Windows programmer
@Windows: I really don't agree with your assertion that it is an irrelevant answer. I just think you've chosen a silly stance and are defending it in the face of much evidence.
Donal Fellows
+7  A: 

There's a list on Wikipedia. I don't think any of them is really prevalent though. Many programmers can learn to write programs with english keywords even if they didn't understand the language. Ruby is a good example, you'll still see Japanese identifiers and comments in some Ruby code.

Firas Assaad
Phoenix (found in linked article), an Arabic programming language is what I was thinking of when I wrote this question. I suggest you all go look at it and see what a program looks like written right to left in another alphabet looks like. http://sourceforge.net/dbimage.php?id=161740
Jaxsun
ChinesePython is awesome. =) Unfortunately the latest release was 6 years ago.
kemiisto
"you'll still see Japanese identifiers and comments in some Ruby code." -- True but you won't see the language itself DEPEND on those non-Latin alphabets.
Windows programmer
A: 

Other people are answering with languages that use punctuation marks in addition to Latin letters. I wonder why no one mentioned digits 0 to 9 as well.

In some languages, and in some implementations of some languages, programmers can use a wide range of characters in identifiers, such as Arabic or Chinese characters. This doesn't mean that the language relies on them though.

In most languages, programmers can use a wide range of characters in string literals (in quotation marks) and in comments. Again this doesn't mean that the language relies on them.

In every programming language that I've seen, the language does rely on punctuation marks and digits. So this answers your question but not in the way you expect.

Now let's try to find something meaningful. Is there a programming language where keywords are chosen from non-Latin alphabets? I would guess not, except maybe for joke languages. What would be the point of inventing a programming language that makes it impossible for some programmers to even input a program?

EDIT: My guess is wrong. Besides APL's usage of various invented punctuation marks, it does depend on a few Greek keywords, where each keyword is one letter long, such as the letter rho.

Windows programmer
@Windows programmer: How about languages that don't have key **words**? At least two earlier posts mentioned APL, which is written in a mathematical syntax.
mpez0
And how many non-Latin alphabetical letters are used in all zero of those words? (Except APL as added in my edit.)
Windows programmer
"What would be the point of inventing a programming language that makes it impossible for some programmers to even input a program?"surely this is the case for programmers starting a language like java when all they have ever seen is Arabic...
Jaxsun
I think keyboards in Arab countries can input Latin letters as well as Arabic.
Windows programmer
I think keyboards in English countries can (be configured to) input Arabic letters as well as Latin.
RCIX
Yes, modern operating systems usually have drivers that let users input any language. But I think keyboards in Arab countries have both Arabic and Latin characters imprinted on the keys themselves and it's probably trivial for users to switch between the two, so programmers who have only ever seen Arabic can probably start Java with Latin characters. The reverse is not true. Keyboards that I've seen in the UK, US, Indonesia, etc., have Latin letters but not Arabic, so users have to learn how to use their OS's drivers to input Arabic.
Windows programmer
+1  A: 

There'is one langauge used in russian ERP system called after company, which developed it 1C. But it's identifiers and operators has english analogs.

Also, I know that haskell has unicode identifiers support, so you can write programs in any alphabet. But this is not useful (My native language is russian). It's quite enough that you have to type program messages and helpful comments in native alphabet.

Vasiliy Stavenko
A: 

I just found an interesting wiki for "esoteric programming languages".

Ondrej Slinták
+2  A: 

Well, Brainf* uses no latin characters, if you'll pardon the language...and the pun.

Tomislav Nakic-Alfirevic
A: 

Agda.

Sample Snippet:

mutual
   data ωChain : Set where
     _∷_,_ : ∀ (x : carrier) (xω : ∞ ωChain) (p : x ≼ xω) → ωChain

   head : ωChain → carrier
   head (x ∷ _ , _) = x

   _≼_ : carrier → ∞ ωChain → Set
   x ≼ xω = x ≤ head (♭ xω)
missingfaktor