In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge about the evolution history of web programming language. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Machine language (Machine Language)
Machine language is a machine-oriented language, and each program written by machine language is only suitable for a particular type of computer, that is, the instruction code usually varies with different CPU models. It can be directly recognized by computer hardware and does not need translation. A machine language is actually a machine instruction, which consists of an opcode and an address code. Machine instructions are in the form of binary code strings consisting of 0 and 1.
Assembly language (Assemble Language)
Assembly language is a machine-oriented programming language, which is designed for specific computers or computer series. Assembly language uses certain mnemonic symbols to represent instructions and data in machine language, that is, mnemonic symbols are used instead of binary machine instructions. This substitution makes machine language "symbolic", so assembly language is also a symbolic language. Each assembly language instruction corresponds to a machine language code, and different types of computer systems generally have different assembly languages.
Computer hardware can only recognize machine instructions and execute machine instructions, but assembly instructions represented by mnemonics cannot be executed. If a program written in assembly language is to be executed, a program must be used to translate the assembly language into a machine language program, which is called an assembly program (assembly system).
The assembler translates the symbolic assembly script into the corresponding machine language script. The program written in assembly language is called the source program, and the machine language program obtained after transformation is called the target program.
high-level language
Machine language and assembly language are limited by machines, time-consuming and lack of versatility. In order to solve this problem, people strive to create a language independent of computers. From the mid-1950s to the 1970s, many high-level algorithm languages have been produced. The data in these algorithmic languages are represented in decimal, and the statements are expressed in English words that are closer to the natural language. They are relatively close to the natural languages and mathematical expressions that people are used to, so they are called high-level languages. High-level languages have great versatility, especially some standard versions of high-level algorithm languages are commonly used in the world. Programs written in high-level languages can be used on different computer systems. However, computers cannot recognize and execute programs written in high-level languages. To execute a program written in a high-level language, the program written in the high-level language must first be translated into binary machine instructions that the computer can recognize and execute, and then be executed by the computer.
Generally speaking, a program written in a high-level language is called a "source program", while a machine language program or assembly language program translated by a source program is called a "target program". The high-level language or assembly language used to write the source program is called the source language, while the language corresponding to the target program (assembly language or machine language) is called the target language.
When a computer translates a source program into machine instructions, there are usually two ways of translation: one is "compilation" and the other is "interpretation". The so-called compilation method is to translate the source program into an equivalent target program, and then execute the target program. The way of interpretation is to translate the source program sentence by sentence, sentence by sentence, and execute at the same time. The interpreter does not produce the target program to be executed, but directly executes the source program itself with the help of the interpreter. Generally speaking, programs that translate high-level language programs into assembly language or machine language are called compilers.
Generally speaking, high-level languages and low-level languages have the following characteristics: high implementation efficiency, low execution efficiency, weak controllability to hardware, large object code, good maintainability, good portability, low-level language: low implementation efficiency, high execution efficiency, strong controllability to hardware, small object code, poor maintainability and poor portability.
We all know that CPU runs binary instructions, and programs written in all languages eventually have to be translated into binary code, but why are there so many differences in implementation? The following is explained by C language as the high-level language representative and assembly language as the low-level language representative. The lower the language, the closer it is to machine instructions in form, and assembly language corresponds to machine instructions one by one. The more advanced the language, the more instructions a sentence corresponds to. The reason is that the high-level language abstracts and encapsulates the underlying operations, which makes the process of writing programs more in line with human thinking habits, and greatly simplifies human labor. In other words, if you write a sentence in a high-level language, it will be converted into many low-level operations, and most of the work will be left to the machine responsible for the conversion (that is, the compiler), thus liberating the manpower. Because machines are used to provide convenience for human beings, the emergence of high-level languages is an inevitable result of the development of computers. The following focuses on why low-level languages are more efficient:
Low-level languages can optimize efficiency by controlling hardware access.
The lower the language month is close to the bottom, that is, the stronger the ability to control hardware access, the higher the efficiency of the use of hardware resources. For example, assembly language can access registers, but C language cannot. Through the access to registers and other hardware, we can optimize the running efficiency of the program to the maximum, while high-level languages such as C use the memory structure such as stack, so the access speed is naturally not as fast as registers.
High-level language programs have work redundancy and loss of efficiency.
Various languages need to be translated into machine code through compilers, and no matter how smart and powerful the compilation is, it will produce redundancy. Redundancy here does not refer to the number of instructions, but whether or not to do unnecessary things. The key to generating redundancy depends on the degree of coupling between language and machine instructions. The greater the degree of coupling, the simpler the compiler translation process and the less redundancy. Corresponding to the compilation of books, because it corresponds to the machine code one by one, so there is basically no redundancy after translation. Due to the abstraction and encapsulation of high-level language, the coupling between high-level language and machine instructions is low, so the whole translation process is more complex, so there will inevitably be more redundancy in the process of materialization of high-level language. It is said that the C language has a 10% loss of efficiency.
Whether the efficiency is high or not also depends on the level of programmers.
A poor programmer may have a lot of useless operations when writing a program with a sink, while a program master can optimize the program to the maximum by writing it in C language. The end result may be that assembler programs are no better than C language programs.
In short, the amount of work to complete a task is the same, the more the machine does, the less people do, and at the same time, people have less control over many details of the program. All kinds of languages are tangled near this balance point. From the optimization of machine operation efficiency to the optimization of development efficiency of C#/JAVA. It is more convenient and efficient for people to operate, at the cost of more things to be processed by the machine and further reduced computational efficiency. But this compression is within the scope of permission, so this is also a kind of progress.
That's all of the article "what is the evolutionary history of the web programming language?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.