News

If Computers Were Invented by Chinese People, Code Should Be Written Like This

If Computers Were Invented by Chinese People, Code Should Be Written Like This

Published: 2021-04-25 22:37   Source: 向明科技

1. Comments are no longer needed; the code is the comment, and the comment is the code.

如果计算机是中国人发明的,代码应该这么写


2. The base numbers should be like this binary:Yin, YangOctal:qian, kun, zhen, xun, kan, li, gen, duiHexadecimal replaced with duodecimal:Rat, Ox, Tiger, Rabbit, Dragon, Snake, Horse, Goat, Monkey, Rooster, Dog, Pig (netizens have already complained about this. Zi, Chou, Yin, Mao, Chen, Si, Wu, Wei, Shen, Xu, You, Hai would be more appropriate)3. At this point, the underlying code must be

·

Yin Yang Yin Yin Yin Yang Yin Yin Yin Yin Yang Yin Yin Yang Yang Yin Yang Yang Yin Yang Yang Yang Yang Yin Yang Yang Yin ...

But looking at the Chinese code below is actually quite a headache; perhaps it is because we are already used to English letters:

如果计算机是中国人发明的,代码应该这么写


4. When learning a language, the first program output is

Hello, have you eaten?

Or have you eaten, world!

Then the comments will use the following code:

如果计算机是中国人发明的,代码应该这么写


Before the project is released, a master must consecrate it; use talismans and cinnabar, to bless a smooth launch with no bugs:

如果计算机是中国人发明的,代码应该这么写


5. There is also a very interesting project on Github, PerlYuYan, which translates Perl into classical Chinese.Address: https://github.com/audreyt/lingua-sinica-perlyuyan First, let's look at its example code:

如果计算机是中国人发明的,代码应该这么写


After reading it, do you regret not studying classical Chinese properly? Then let's look at its source code, and we can understand that the author actually changed many instructions into individual Chinese characters, creating the feeling of classical Chinese grammar.

如果计算机是中国人发明的,代码应该这么写


Let's look at its five-character poem:

如果计算机是中国人发明的,代码应该这么写


Translated into Perl, it is:

如果计算机是中国人发明的,代码应该这么写


6. Finally, there is one more point: if computers had been invented by Chinese people, Koreans would very likely say that they were the ones who first came up with the idea.


Related

15899857741
Requirement Posting×
Leave your contact details and project requirements, and we will get back to you shortly