Computer programming language

The most important tool for programming
Collection
zero Useful+1
zero
The computer programming language is Programming The most important tool of rule of grammar Language. From the birth of computer, computer language Experienced machine language assembly language and high-level language Several stages. [1]
At all Programming language In, only machine language source program Can be used by computer Direct understanding And execution. Programs written in other programming languages must use Language processor "Translate" into machine language programs that can be recognized by the computer. [1]
Chinese name
Computer programming language
Classification
Machine language, assembly language and high-level language
Examples of categories
C++ , JAVA, etc

Language Introduction

Announce
edit
Computer programming language refers to the language used for communication between people and computers, and is the medium for transmitting information between people and computers. Because it is used for programming, it is also called Programming language Or programming language. [2]
computer language It is a special language. Because it is used to transfer information between people and computers, people and computers can "read". To be specific, on the one hand, if people want to use computer language to command computers to complete certain features, they must give a special description of this work, so it can be understood by people. On the other hand, the computer must act according to the computer language description to complete the specific work described by it, so it can be "read" by the computer. [2]

development history

Announce
edit
Computer programming language is an important tool for programming. It is stored, processed and executed in a computer, and has a specific syntax structure. Computer programming language is also a bridge of communication between human and computer. [7] As from Oracle To modern times The Evolution of Chinese Characters With great changes, computer language In the short decades since its birth, it has also gone through a process of evolution from low to high. Specifically, it has experienced machine language assembly language high-level language 3 stages. [2] Modern society, computer and network technique Appeared, greatly improved production efficiency Computer language is also widely used. There are about 2500 programming languages from scratch, which have experienced rapid development. [7]
In the stages of machine language, assembly language and high-level language, machine language is the most convenient to be accepted and executed by the computer. Because there are only 0 and 1, it can be directly recognized by the computer, but it is not conducive to our understanding and memory; Assembly language is widely used in low-level programming, Embedded system Industrial control And other fields; Advanced languages account for the largest proportion, whether it is computers or mobile phones application program Are commonly used natural language To carry out research and development. In 2019, Java, C Python , c++, vb.net, etc. are all high-level languages. Computer programming language has its specific rules and structure, and its application prospects in various fields are also very broad. [7]

machine language

Machine language is used Binary Code representation, which can be directly recognized and executed by computer Machine commands It is the operation function that the computer designer gives the computer through the computer hardware structure. Machine language is First generation computer Language. [3]
The computer is composed of "0" and "1" Binary number At the beginning of the computer, people could only use computer Language pair The computer sends instructions, that is, writes a series of instruction sequences composed of "0" and "1" to be executed by the computer. The language that the computer knows is machine language Program in machine language, Programmer Remember all the computers you use first Command code And code. When writing a program, the programmer has to deal with every instruction and every data Storage allocation And I/O, we must also remember the state of the work unit used in each step of the programming process, which is a very tedious work. Moreover, the program is all binary instruction code, Intuitiveness It is poor, easy to make mistakes, and difficult to modify. In addition, the machine languages of different models of computers are not interlinked. Programs written according to the machine instructions of one computer cannot be executed on another computer. Therefore, programs executed on one computer must be executed on another computer Programming , causing repeated work. However, since machine language computers can recognize directly without any translation Operational efficiency It is the highest of all languages. [3]

assembly language

To overcome machine language It is difficult to read, compile, remember and make mistakes English sigla , letters, numbers and other symbols to replace the instruction code (such as the machine code using ADD to represent the operation symbol "+"), so assembly language is produced. So assembly language It is used for Mnemonic It is still a machine oriented computer language. Assembly language is also called Semiotic language Because assembly language uses mnemonic symbols to write programs Binary code Programming should be more convenient, which simplifies the programming process to a certain extent. Assembly language is characterized by the substitution of symbols Machine commands code. And mnemonics and instruction codes One-to-one correspondence , which basically retains the flexibility of machine language. The use of assembly language can be machine oriented and give full play to the characteristics of the machine, and obtain high-quality programs. [4]
Because of the use of mnemonic symbols in assembly language, the program compiled in assembly language is sent to the computer, and the computer cannot be used as machine language The written program is recognized and executed directly, and must be stored in the computer“ assembler Only by processing and translating can we become binary code programs that can be recognized and processed by computers assembly language Symbol program name written in non machine language source program Runtime The assembler should translate the source program into Target program The object program is a machine language program. Once it is placed in a predetermined location in the memory, it can be CPU Handling and execution. [4]
Assembly language image Machine commands Same as the hardware operation control information , so it is still Machine oriented language It is tedious and time-consuming to use, and its versatility is also poor. Assembly language is a low-level language. However, assembly language is used to compile system software and Process control software , whose target program occupies Memory space Few, fast running, and irreplaceable use of high-level languages. [4]

high-level language

Whether machine language Assembly language is also oriented to the specific operation of hardware. The excessive dependence of the language on the machine requires users to be very familiar with the hardware structure and its working principle Computer It is difficult for personnel to do so, which is unfavorable for the promotion and application of computers. The development of the computer industry has prompted people to seek some computer languages that are similar to human natural languages and can be accepted by computers with definite semantics, clear rules, natural intuition, and universal and easy to learn. This computer language, which is similar to natural language and accepted and executed by computers, is called high-level language. High level languages are user oriented languages. No matter what type of computer, as long as it is equipped with corresponding high-level language compiler or Interpreter , the program written in the high-level language can be universal. [4]
The high-level languages widely used today are BASIC PASCAL 、C、 COBOL FORTRAN , LOGO and VC VB Etc. These languages belong to system software. [4]
Computers cannot directly accept and execute source program , when the source program is input into the computer“ Translator ”Translate into machine language Formal Target program , the computer can recognize and execute. This "translation" usually has two ways, namely Compilation mode and Mode of interpretation Compilation method: prepare a file called Compiler A machine language program written in a high-level language is stored in the computer as system software. When the user enters the source program written in a high-level language into the computer, the compiler will translate the source program into an equivalent object program expressed in machine language. Then the computer Re execution The object program to complete the operation to be processed by the source program and obtain the results. The explanation method is: when the source program enters the computer, Interpreter While scanning, the explanation is input sentence by sentence and translated sentence by sentence. The computer executes sentence by sentence without generating Target program PASCAL, FORTRAN, COBOL and other high-level languages execute compilation methods; BASIC language The executive interpretation is the main way; PASCAL and C are advanced languages that can write compiler programs Programming language Every high-level (programming) language has its own artificial rules Special symbols English words rule of grammar And sentence structure (writing format). Advanced language is closer to natural language (English), but is more similar to hardware function phase separation (Completely divorced from the specific Command system )It is convenient for users to master and use. High level language has strong universality, compatibility Good, easy to transplant. [4]

Language selection

Announce
edit

Selection principle

In the process of computer software development, programmers should consider various factors comprehensively. It includes the following aspects: [5]
(1) Software to be installed hardware environment [5]
(2) Software platform support. [5]
(3) Development Design cost And efficiency. [5]
(4) Choose a relatively proficient computer programming language. [5]
(5) Customer requirements for software use. [5]

Selection method

1. Analyze programming program requirements and platform support
Computer programming language
We know that in the selection and application programing language In the process of implementation, it is necessary to ensure that the written program can meet the needs of actual use, and it should be adjusted according to the actual application situation at the first time. conduct software development When using a familiar programming language, one can reduce the time for software development; Second, it can improve the efficiency of software programming. Even if the programming language used is different, it can be adjusted quickly. Therefore, for software development Restore environment It is very important to combine relevance with dynamic language. Secondly, after software development, it needs to be used in the platform, so it needs to be supported by the platform. For example programming language In the process of running, the programming language should be selected according to the adaptability of the language. All operations in the platform need to adapt to it. Select the appropriate platform according to the characteristics and advantages of the programming language. Platform support is the necessary basis for the selection of the programming language. [5]
2. Think about the cost of programming language and investigate the application environment
First of all, in the process of selecting the programming language for computer software development, a very important selection basis is the project function. The composition of the integrated system covers many parts, but the whole system does not use only one language to program, and its writing must use all languages. High operational costs, such as video and signal processing cryptography In the early years of computer development, developers should think comprehensively and choose a static language when writing programs, such as Java Language. Secondly, the premise and foundation of software development is the hardware environment. All programming languages should be fully adapted to the hardware environment, so the selection of programming languages should consider the external hardware environment. Language selection is very important for programming. On the one hand, language distribution should be selected; The second is to coordinate the overall framework of the project. Different programming languages Connectivity Strong. If you want to learn a programming language well, you must understand many languages. When developing software, it is necessary to use programming flexibly, and the selection of programming language needs to adapt to the environment, so as to ensure that the written program can be quickly adjusted and effectively used. [5]
3. Select familiar programming languages and think about whether frequent modifications will occur
Although it is an innovative strategy to try new programming languages, for projects that are not research type, computer software development staff will still start from familiarity with programming languages, The fundamental reason for this phenomenon is that the selection and use of familiar programming languages can help the development staff estimate the overall project in the development stage of computer application software timetable To prevent other variables from being generated during development. Moreover, among a large number of programming languages, a high-quality programming language can make the program quickly adjusted and rebuilt. If the software development staff wants to repeat Modify program It is very important to select a programming language that can be quickly restored. According to these circumstances, software development personnel need to select Dynamic language , because this language can combine multiple libraries of different types Language use The scope becomes larger and the advantages increase. Moreover, one of the characteristics of dynamic languages is that their checking work is based on software running state Data class check will only be performed in the Compile time Check. [5]

development direction

Announce
edit
1. Convenient operation for users, based on the current computer program In the design process of Object-oriented programming as well as Data abstraction Both are occupied. In order to effectively improve the operation convenience of computer programming language, it is necessary to ensure that the programming language is easy to learn and does not have a high degree of professionalism. The programming language should develop in the direction of providing convenience for more users. It is required that as long as the user has the ability of certain basic concepts and basic use methods, the user can Workflow Compile to effectively improve the convenience of operation. [6]
2. Programming languages will also gradually develop in the direction of object-oriented, providing simple class mechanisms and dynamic interface models. Encapsulated in object state variable And corresponding methods, realizing modularization and information hiding The prototype of a class of objects is provided, and through the inheritance mechanism, the subclass can use the methods provided by the parent class to achieve code reuse; because computer network have Openness Therefore, the programming language should give full consideration to security to provide a safe environment for programming. So you should create safeguard Mechanism, according to the characteristics of program writing, develop an adaptive security system, and build a safe and harmonious writing environment; Platform independent The purpose of sex is to make the program written in different machine . Migration on different platforms is not limited by the platform, so the writing language should be platform independent, so that the written program can be more convenient in application, Scope of application More extensive. [6]