1 Rationale
ref to: http://www.yanying.wang/SOICOL
1.1 Lisp and its parenthsis
Lisp, as an ancient programming language, when I was learning it with inherent ideas from modern programming languages such as Ruby, I noticed there are a few distinctions. Among them, The most prominent one is the form.
Operation | Ruby code | Racket code |
number addition | 1+2+3 | (+ 1 2 3) |
create array | (vector 1 2 3) | |
create hash | ||
create array of a range of numbers | Array(1..5) | (build-list 5 values) |
create array of duplication elements | Array.new(3, 1) | (make-list 3 1) |
By the examples above, we can see in Ruby, different operations are wrote in distinctive forms, but in Racket they are in same form: elements in one parenthesis. This each other resembled form of LISP impedes people differentiate them on a glimpse, therefore, the meaning of operations are more blamed on the function names(first word of elements in parenthesis).
In conclusion, the function names of LISP take more responsibilities to annotate various operations than modern PLs. The more informations that function names show to us, the better we can distinguish them and understand the purpose and usage of them.
1.2 Chineseoid characters
Compare to English, of which the writing is based on the pronounciation of speaking, Chinese contrarily emphasize its writing more than speaking, which has actually developed a way to write related objects and concepts, we call it LiuShu(六书).
With the fact that chinese characters are just the implementation of using LiuShu for the communication of human, what I am doing here is using it to invent and design lots of chinese resembled characters, where we draw the phrase chineseoid characters, which especially is also called zi, means looking like chinese characters but can not be recognized by most Chinese people.
At last, we use those characters instead of common English words for the concepts of Lisp and even the whole programming language world to make human interact better with it.
Ming code | Racket code |
(build-list 10 values) | |
( 10) | (range 10) |
As chart shown above, the keywords of Ming are much short in length, and in forms the complex characters are usually constituted by other simpler characters, and those simpler characters are usually used for related function names as well.
Further more, the connotations behind the characters work the same way, they are related to each other and complex concepts are broke to simple concepts as well.
Most importantly, the chineseoid characters implemented here also have the ability to imply to human about the arguments and results of functions, check Naming Rules for more.
1.3 Character implications
Since the chineseoid chracters are much complicated than general western characters, there are few terminologies we need to know in advance: radical, component, part(check the wiktionary page for details).
Simply put it, phrase is composed by more than one characters, character is composed by more than on parts. For the parts of an specific character, only one of them can be counted as radical, which usually is another standalone character that provides the basic meaning for the specific character, and the other one can be counted as component, which usually implies the difference(type of input, type of output, etc.) between the meaning of radical and the specific character.
Take example of the procedure 伄, this character is composed of two parts: 亻 as component and 弔 as radical. By composition, we can deduce that this procedure has a similar usage as 弔 since it is the radical. And the 亻 additionally means the type of output data is list(read Naming Rules for more).