Although programming languages vary in forms and rules, the keywords used for almost all of them are in English.



The International Data Corporation (IDC) estimates however that nearly half of the world’s 22.3 million software developers come from the Asia-Pacific region. China and India alone account for about one third of the world’s total developer population.



In an attempt to add some diversity to the range of available programming languages, Carnegie Mellon University computer science major Lingdong Huang has developed ‘Wenyan-Lang,’ a programming language based on Chinese hanzi characters and the wenyan classical Chinese grammar system.



Huang did not simply replace the English characters with Chinese hanzi, instead he applied NLP techniques to convert classical Chinese grammar to JavaScript, Python, and Ruby. He has open sourced the wenyan-lang project on GitHub, where it received a staggering 11,900 stars in a week or so.

Wenyan-lang Programming window and corresponding JavaScript

A fan of classic Chinese literature, Huang came up with the idea of programming in Chinese in order to shed light on the beauty of wenyan and to inherit the historical imprint left by generations of eminent figures in Chinese history.



But most importantly, Huang believes the goal of communication is to go beyond the limits of language: “My project still has a lot of room for improvement, but my desire for communication is as strong as some of the historical figures.”



Huang says programming punctuation and line breaks can be removed without affecting the output. Considering the difficulty converting between classical Chinese and other programming languages, he has provided a “cheat sheet” with tips and conversion rules.

Variable names

Huang has also included a renderer that can display the program in a manner that resembles pages from ancient books and can parse the resultant SVG file back to the original program.



The Wenyan-Lan project is available on GitHub.

Journalist: Yuan Yuan | Editor: Michael Sarazen

Share this: Twitter

Facebook

