Classical Chinese as a Programming Language

In the previous post, David Branner's insights helped explain the expressiveness of code in Wenyan, a programming language built on Classical Chinese. However, Branner's own research shows parallels between Classical Chinese and programming languages that already exist within the language. Specifically, that "Classical Chinese grammar has approximately the order of formal simplicity of a programming language, rather than that of a natural language."

This unusual feature comes from a fluidity in its parts of speech. In English, we can verbify a noun: "knife" someone or "book" them, etc. Classical Chinese goes much further; there all verbs can be nouns, and nouns, verbs.

The transformational grammar for Classical Chinese is thus very different than that for English. In analyzing an English sentence, we have rewrite rules such as NP→Det N, meaning a noun phrase can be replaced ("rewritten") with a determiner + a noun. Additional rules might give us Det→"the" and N→"person," ultimately resolving our noun phrase to "the person." Because of its fluidity of speech, Classic Chinese adds recursion, with circular patterns like the grouping of V→N and N→V.

Read More

This entry originally appeared at, and may be a summary or abridged version.