Hi everyone,
For the last year, I've been trying to explore what could it achieve if I made Chinese as the interface of Racket. I'd like to share with you what I've found in this post.
My story started from my noticing the lack of expression of English when it is imposed to naming things in programming languages, especially a language like Lisp, which indulges using only parenthesis instead of developing different forms like other modern programming languages to distinguish different things. as a result, different means of conceptions and functions depend only on their names. however, most of those names don't elaborate on the usages and purposes. I guess that's also part of the reason why we developed type systems and lots of dazzling syntaxes within all the modern programming languages.
And next, I'll skip the blah blah and get into the most important thing that I what to say here.
- Chinese can make names really short with reserving more information. That's easy to understand, have a look at them, chinese characters are much more diverse, take English as an example, the writing system of which actually originates from recording the pronunciation of words.
For the information, when I say Chinese I do not mean modern Chinese, it can't make names short. To make names short, we need to create new chars for new concepts, which creating method is an inherent feature of Chinese and it is called liushu(六书), which is also the reason why Chinese have more than 100,000 chars in the history of its using, because the ancient Chinese people keep creating new chars to express new concept they had met, although lots of those created chars were abandoned to use and nobody knows the meaning and reason why they were created. And at last, there're only 3500 frequently used chars for modern Chinese.
- Not all but most Chinese chars are constituted by meaningful components, different chars share different components and thus those chars can be grouped by different components to imply which grouped chars have this trait and which have that trait. Migrating this feature to programming languages, it can be used to structure new chars as names for those concepts which all hold a special usage, purpose, or input output types of parameters and so on.
This is not that hard to understand, take current Racket as an example, the ! and ?, once you see ! in the function names, you'll know this function would directly change the value of the original variable, ? stands the output result must be a boolean. the components of Chinese chars work the same way:
江(river)、河(also river)、湖(lake)、海(sea)、泪(tear, 目 means eyes)、沉(sink)、泣(cry)、浅(shallow), notice that all those cn chars share the same component 氵, which is the simple way to write 水(water), to express all those concepts have the same thing to do with water actually.
Following this thought, I created lots of Chinese chars for Racket concepts, such as pairs, lists, hash, vectors, and related functions as well. I choose Racket because the concepts of Lisp are highly connective, by using Chinse this connection can be expressed out rather explicitly. For examples:
- all the concepts and functions related to numbers of Chinese chars consist of the component "米"; e.g.;
- 亻is used to express that for a function, the output result has the same type as the input. In contrast, 阝is almost the same as 亻, except the content of the output result must be a part of the input. e.g..
for more rules I made, please check out http://www.yanying.wang/ming/. And I'll be very glad to hear the feedbacks or anything you think of my post.