laitimes

The Cangjie programming language of the Hongmeng system is very likely to become popular if it is Chinese programming: a brief introduction to the Hongmeng system

author:Little Wisdom Yahui

On August 9, 2019, Huawei officially released Huawei HarmonyOS at the developer conference held in Dongguan.

On August 31, 2019, Huawei officially launched the Ark compiler. Provides DevEco Studio development environment with integrated Ark compiler. https://developer.harmonyos.com/cn/develop

The Ark Compiler is the first static compiler to replace the Android virtual machine mode, allowing developers to compile high-level languages into machine code in one go in the development environment. In addition, the Ark compiler supports multi-language unified compilation, which can greatly improve development efficiency. Give developers the freedom to choose Java, JavaScript, and other languages.

In October 2021, Huawei announced that it was equipped with more than 150 million Hongmeng equipment.

On October 22, 2021, at the Huawei Developer Conference 2021 (Together), Huawei announced that the Cangjie programming language (char) under development is scheduled to be released in 22 years.

Will Cangjie be a Chinese programming language like easy language?

Support for Chinese programming believes that the native language of Chinese is Chinese, and programming using Chinese can be more intuitive and easier to understand, and can better popularize programming in China. Is this really the case?

Programming languages, like human languages, are a complete set of symbologies. This symbology requires a degree of abstraction.

Chinese abstracted into thousands of commonly used Chinese characters, constructed from strokes.

English abstraction is thousands of commonly used words, and words are constructed of letters.

Chinese there is image beauty, such as calligraphy, there is fuzzy beauty, Chinese can always form a vague artistic conception, the same language can have different interpretations. In terms of abstraction, it seems that the degree of abstraction is not enough.

The English expression is accurate, and it seems that it was really born for science.

The establishment and development of mathematics and logic, a set of reasonable and standardized symbolic systems is very important, which can be used for induction, reasoning, and the establishment of a formula system. The laws of physics also require mathematical expression.

Li Shanlan, a famous Chinese mathematician in the 19th century, tried to sinicize Western algebraic symbols.

When Li Shanlan translated Western works, he involved too many symbols, but at that time, the Chinese literati could not accept this kind of total Western, so Li Shanlan found a compromise method, such as he changed the Arab 1, 2, 3, and 4 to China's one, two, three, and four, and the plus and minus signs he used ⊥ and ㄒ to represent, and the 26 letters in the algebra, Li Shanlan also had a way, he used tiangan, that is, A, B, C, ding, plus the earth branch, but the tiangan added up to only 22, and there was still 4 missing. So Li Shanlan counted the four words of heaven, earth, people, and things to correspond to 26 letters.

However, the 26 letters are divided into uppercase and lowercase, for this, Li Shanlan still has a way, he will invent the 26 characters corresponding to the capitalization, add a "mouth" next to the left side of each Chinese character, and the integral symbol is represented by the "he" word next to the "product" word, and the differential symbol is represented by the "彳" word next to the "micro" word, thus inventing a set of Chinese mathematical formulas.

The Cangjie programming language of the Hongmeng system is very likely to become popular if it is Chinese programming: a brief introduction to the Hongmeng system

The above expression is obscure and difficult to write, and naturally will not be accepted.

The same is true of computer science, where encoding data and instructions requires a convenient set of symbology. The symbology used in C, C++, Java, Python and other programming (including dozens of operators, dozens of keywords, operators and keywords of different programming languages are basically the same function) is very reasonable. Therefore, the keywords of the programming language do not need to use Chinese, and support Chinese as characters.

This is especially true from the perspective of sustainable development and internationalization. The popularity of a programming language requires a more elegant description and logical expression of the solution to the problems in the field in a certain field, and a better ecology.

Some might say that if computers were invented Chinese, wouldn't programming languages be Chinese? This hypothesis simply does not exist, just as the scientific revolution did not sprout in China.

Some people also say that at the beginning of the emergence of computers, Chinese processing difficulties, and did not solve the problem of Chinese input later? This is not the same thing at all. Chinese input is just a set of input coding schemes, whether it is a king code or a pinyin input, from one to several keys input combined into a Chinese character input (a Chinese character coded as 1 to several letters). Storage is another set of schemes (ASCII in English, GB2312 in Chinese, Unicode, etc.), and the input is the same as in English, forming a graphic output through dot matrix coding.

Let's take a look at the easy language code from 1 to 100:

Here is the C language code:

Code that uses Chinese keywords is harder to write and harder to read.

In addition, the developers that programming languages need to face need to consider globalization, not just Chinese developers. Developers who don't Chinese want to use Chinese programming language unless they are already popular in The Country, have developed killer apps, and are good enough in their application areas.

Therefore, personal judgment Cangjie programming language will not be Chinese programming language, otherwise its popularity is minimal.

In fact, the difficulty of programming does not lie in the syntax level of the programming language, but in the algorithm level of the logical expression of the problem solving.

We know that a computer system is a system of abstraction.

In terms of code, the underlying layer is the INSTRUCTION SET of the CPU (code composed of 0 and 1), the machine language corresponding to the binary sequence, then the operating system, the operating system and the hardware together constitute the concept of the platform, then the assembly code implemented by the assembler, and then the high-level language implemented by the compiler.

In terms of data, all kinds of data processed by code should also be digitized and binary. Different interpretations of binary sequences constitute different types of data encoding specifications. Such as complement of integers, IEEE574 encoding scheme of floating-point numbers, ASCII of characters, GB2312, Unicode, etc. As for pictures, audio, and video, they are all implemented with different encoding schemes.

What kind of appearance Cangjie will appear is not yet clear, but some netizens hope that it is a Chinese programming system.

Cangjie is rumored to be headed by Feng Xinyu, a professor at Nanjing University, born in 1978 and receiving his bachelor's and master's degrees from Nanjing University in 1999 and 2002, and his Ph.D. from Yale University in 2007. His main research interests are programming languages, system software, and formal program validation.

In fact Chinese programming has been developed in China for many years, but it has not been developed. For example, the Easy Language, which was launched in 2004, has an independent compiler and has all the independent intellectual property rights from the bottom up. Chinese version of the C language ------ language, consisting of a complete set of programming syntax and supporting tools, aiming to popularize, popularize, Chinese computer and software programming, and improve the maintainability of the program; there are many derivative versions of the Xi language, such as Chinese C++ development partner Xi Jiajia, Chinese Java programming system Xi Jiawa, 51 microcontroller Chinese development partner Xi 51 and so on.

In addition, there are hunting code, propyl positive, PerlYuYan, python, O language, Chinese peigen, CHTML, etc., many Chinese programming languages, but most of them are spread and used in some specific minority groups.

Why are so many programming languages Chinese, but they are not popular?

Some senior programmers think that there are many reasons, but there are the following:

First, the programming language is actually a separate language for computers, it is not English, Spanish, nor Chinese, but borrows some words and symbols from other languages;

Second, the computer actually executes the machine language, that is, the language composed of 0 and 1, and any programming language must eventually be compiled and called a machine language to be executed. If you use Chinese programming, you also need to compile into a machine language, that is to say, in addition to Chinese programming language, you must have a responsive compiler, and this workload is very large;

Third, programming efficiency, the current keyboard is alphabetical, if you use Chinese programming, you need to convert to Chinese input method, so that the input efficiency is actually reduced;

Fourth, the Chinese symbology has both full and half-angle, and it will be silly and unclear when programming, and it will be very troublesome to check errors when debugging;

Fifth, the naming system of Chinese is also easy to cause confusion;

Sixth, many systems and API interfaces are named based on English characters, and it is easy to cause confusion when quoting.

Therefore, some people feel that instead of obsessing over the introduction of Chinese programming, it is better to spend more energy on translating documents and compilers to make it easier for more people to understand the available information.

We know that for a computer language to be recognized and accepted by most programmers, it must at least do the following:

1 Syntax design, keyword substitution is not technical content and contribution. Rich class library support is required.

2 What are the characteristics of the connotation of business value (adapting to the domain problem), compared with other programming languages? Chinese is just one of many features. For example, good at operating system development, good at database development, good at website development, good at mobile application development and so on.

3 Ecosystem support, there must be many people willing to participate, especially high-end talents willing to participate.

For a new programming language to have a market, it needs a high level of technical support. China's current software technology level is still worse than that of foreign countries. If it is a Chinese programming language is even more difficult.

<h1 class="pgc-h-arrow-right" data-track="18" > attached: A brief introduction to the Hongmeng system</h1>

Huawei's "Hongmeng" operating system, the underlying (Linux kernel, runtime) is written in C, the virtual machine may use C or C++; the development environment for application developers is likely to be Java.

The Cangjie programming language of the Hongmeng system is very likely to become popular if it is Chinese programming: a brief introduction to the Hongmeng system

Huawei's "Hongmeng" system consists of four parts: Linux kernel + Kirin processor runtime + compiler + virtual machine.

Linux kernel: The Linux kernel is open source and maintained by the Linux kernel team, while the Linux kernel uses C, not C++, which is much more efficient than the object-oriented programming language C++.

Runtime: The runtime is based on Linux, and the runtime needs to be adapted for different processors. For example, the instruction set of the Kirin processor and the instruction set of the Qualcomm processor may be different, not exactly the same, then there is a problem of adaptation, and the library is usually written in C language.

Virtual machine: The virtual machine is used to communicate the operating system and hardware, is a bridge between the two, shields the differences between different systems, can achieve cross-platform, and greatly reduces the difficulty of application development. Currently, the commonly used virtual machine is the Java Virtual Machine.

Compiler: The compiler converts code written in Java into virtual machine code or machine code that the hardware can directly recognize. Huawei's Ark compiler implements static compilation of code, which is 60% smoother than traditional Android applications.

Hongmeng operating system is a microkernel design, while the Android system is based on Linux macro kernel design, in comparison, microkernel development is difficult, but the system stability is high.

Hongmeng operating system supports mobile phones, computers, smart wearable devices, and smart homes at the same time, forming a seamless, unified operating system and compatible with all Android applications. This operating system is in line with the Fuchsia idea that Google is developing and is ready for the 5G and Internet of Things era.

ref

https://baijiahao.baidu.com/s?id=1676951844683332318&amp;wfr=spider&amp;for=pc

https://www.sohu.com/a/318681235_434807

Read on