Purposeful Programming Languages: Non-English Syntaxes
colin-williams-dev
Posted on April 13, 2023
As a native English speaker I am very privileged to be able to jump into almost any programming language and have some basic understanding of the "human-readable" parts. There are a some exceptions in languages like Web Assembly where the constructions and operations can become quite esoteric and verbose where even a native English speaker might have no idea what they imply. With that being said, these ideas present the question of: how do non-native English speakers learn to code?
All modern programming tools are based on the ASCII character set, which encodes Latin Characters and was originally based on the English Language. As a result, programming has become tied to a single written culture. It carries with it a cultural bias that favors those who grew up reading and writing in that culture.
source
Well, the first obvious answer is: they learn English as they learn the new programming language. In many parts of the world students train intensely to learn English throughout their grade-schools. Kudos to all of the international students who work hard and navigate this obstacle on top of the others they may face (us Americans are a pretty privileged lot when it comes to things like this...).
Despite languages like Python (syntax English, created in Holland), Ruby (syntax English, created in Japan) and Ruby on Rails (syntax English, created in Denmark) that were created in countries where English is not the dominant language, the developers still elected to use English as their base syntax. As many of you are aware, English is the de facto lingua franca of the world (actually makes me feel embarrassed at my own privilege once again...). With this in mind, programmers figured that due in part to the international level of digital era it would be best practice to use such a language as their model. As you could imagine, it would be quite difficult to debug your code base if your repository has chunks of it in different languages, potentially that you can't read or pronounce.
BUT,
This still disadvantages people who do not speak English or are learning it as a second language. Because of this, there have been a variety of tools to help with this and I will demonstrate a few of them in the following:
Citrine
In an attempt to "democratize software" a flexible, general purpose, scripting language was created. A team of three developers (de Mooji from Holland, Jilani from India, and Litwinow from Russia) released their free and open source language Citrine.
According to their website: "Citrine can be used as a stand-alone programming language, an embedded scripting language, DSL or as a transpiler". It seems to have similarities to JavaScript for prototypal inheritance and object orientation. They also claim to be like BASIC and LISP as well. But, coolest of all is Citrine's automatic translation, allowing any member of your team to write in their native language: docs
This approach seemed to be the most-encompassing but there are also other languages I have found that provide non-English syntax. Some of them are:
Qalb
Qalb is the Arabic word for heart and is also the only Arabic programming language: nas.sr/قلب/ Created by developer Ramsey Nasser with the intention of creating an art-forward, functional language:
“Arabic people have a very intense relationship to text, and a lot of the culture is predicated on language itself. So I wanted to bring as much of the Arab tradition of calligraphy into the computer science tradition of text and source code.”
Qalb is an attempt at making computer programming more approachable in the Arab world. Nasser hopes that Qalb's popularity will spread within the academic scope and make it one step easier for native Arabic speakers to see if they like writing code as well as to hold onto their culture as they enter the professional space.
Qalb is said to have similarities to LISP, C++ and JavaScript. As you can see from the banner image above and below, the code really looks beautiful.
Wenyan-lang: 文言
Another case for non-English programming languages is: wenyan-lang: "an esoteric programming language that closely follows the grammar and tone of classical Chinese literature." After reading into its creator, Lingdong Huang, I would say this language appeals to the opposite approach of what I have mentioned above. That being, a syntax that is less familiar to all, even to contemporary Chinese/Mandarin speakers, in an effort to celebrate the history and artistry of a traditional form instead. In a way, using an esoteric language achieves a similar effect, that is; the crossover of ancient Chinese speakers and software engineers is so small that it evens the playing field much to the same effect as using a syntax that everyone knows. No one knowing a language is the logical inverse of everyone knowing one.
Wenyan-lang is a difficult language to make comparisons to because traditional Chinese does not use spaces to divide sentences into words. Therefore, "how to split a sentence is the task of the reader... not the writer." This resulted in Huang making the wenyan-lang interpreter go from the longest keywords to the shortest keywords to determine what the programmer wants, "and it works", as he claimed in this interview.
Here is a link to its online IDE: wenyan-lang
Above is an example of using .wy
to write "Hello World" and below is how it currently compiles to JavaScript, Python or Ruby.
Furthermore, an example of the programming window using the Sieve of Eratosthenese in the language's traditional Chinese Characters and classical Chinese grammar. The language's developer Huang is fascinated by the algorithms of ancient Chinese math and philosophy books and wanted to create a language that maintained the affects of those works.
The world of non-English software development is expanding and it is a profound and democratic evolution. If you are interested in more, please follow the links I have provided in the Works Cited section to contribute, learn and share.
Works Cited
Citrine
language
contributions
Posted on April 13, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.