From the weird department: the Wenyan programming language
(updated )A few days ago I stumbled on the programming language Wenyan, designed by Lingdong Huang, a programmer–artist from CMU.[Note 1] Unlike most programming languages in use today, Wenyan does not try to pass off as resembling English: programs written in Wenyan are written completely in Chinese characters.
Wényán, of course, is 文言 (ˌmɐnˌjin), or Classical Chinese.[Note 2] Not only are Wenyan programs written in Chinese characters; they are in fact pretty much actual, grammatically correct Classical Chinese.
Here is an example of what a Wenyan program looks like (I kid you not),
pulled straight from the example file “factorial.wy”:
吾有一術
This is what the program means, quite literally:
I have a method[Note 4]; call it ‘factorial’.
If [you] want to run this method, [it] must first receive a number, namely A.
Then, running this method means:
If A equals one,
[the] result [is] A.
If not,
decrease A by one, name it B;
Apply ‘factorial’ to B, name it C;
Multiply C by A, name it D;
[The] result is D.
Such is [the] method called [the] ‘factorial’.
Apply ‘factorial’ to five. Write it [out].
If you have a background in computer science, you might notice the English translation look awfully like pseudocode; but the Chinese source text is not pseudocode, it’s actual, executable code.
Many years ago, the Japanese also created a programming language that used Japanese characters,
but I don’t know what happened to that language.
I also don’t know how closely it resembled actual Japanese,
but this one is pretty close. Notes