Differences between the classification of program languages and assembly, compilation, and interpretation languages

Source: Internet
Author: User

Program languages can be divided into five categories

1. Web page script ages

Webpage code, such as HTML, JavaScript, CSS, ASP, PHP, and XML, should all belong to this class (according to Cai's meaning, HTML should not belong to anguages, maybe he thinks it is too simple, but I think HTML should also be counted. It doesn't matter who you like to listen)

2. interpreted languages (interpreted language)

Including Perl, Python, REBOL, Ruby, etc. It is also known as the script language and is usually used to communicate with the underlying operating system. According to Cai, everyone should at least learn a set of such languages. The disadvantage of this type of language is that it is inefficient and the source code is exposed-so it is not suitable for developing software products and is generally used for Web servers.

3. Hybrid laguages (hybrid language)

Java and C #. Between the interpreted type and the compiled type. Cai believes that C # is the most important language of. NET and is worth looking forward to its future development. As for Java, Cai calls his "Sleepless in Java"-I do!

4. Compiling languages (compiled language)

C/C ++ and Java are both compiled languages. Cai said that C ++ is very complicated and cannot become a master in year 35 (based on this sentence, I decided to surrender to Java, but to become a master, you must understand C/C ++.

Regarding Delphi, Cai said that if you want to use a language across Linux and Windows platforms, Delphi seems to be the best choice.

5. assembly languages)

Assembly languages are the most similar to hardware languages, but few are using them now.

Recommended program language learning Sequence

If you do not have any program experience, you can follow this order: JavaScript -- interpreted language -- hybrid language -- compiled language -- assembly (if needed)

With a popular phrase in the industry, the end is "Real programmers use C ++, smart programmers use Delphi". So what kind of programmers use Java?

---------------------------

Assembly language:

Since the Assembly Language uses the mnemonic number to write programs, it is easier to program binary code in machine language and simplifies the programming process to a certain extent. The feature of assembly language is that it replaces the machine instruction code with symbols, and the mnemonic is one-to-one correspondence with the instruction code, basically retaining the flexibility of the machine language. The assembly language can be used to target machines and give full play to the features of machines to produce high-quality programs.
The Assembly Language is designed for specific models and is inseparable from the command system of specific computers. Therefore, different models of computers have different structures in assembly languages, compilation language programs compiled for the same problem do not communicate with each other on different types of computers.
In the Assembly Language, the program compiled by the Assembly Language is input into the computer, and the computer cannot be directly identified and executed like a program compiled by the machine language, the binary code program that can be recognized and processed by the computer must be processed and translated in advance by the computer's "assembler program. Symbolic programs written in non-machine languages such as assembly languages are called source programs. during runtime, the assembler program translates the source program into the target program. The target program is a machine language program. Once it is placed in a predetermined location in the memory, it can be processed and executed by the computer's CPU.
Like machine commands, assembly language is the control information of hardware operations. Therefore, it is still a machine-oriented language. However, the assembly language is used to compile system software and process control software. The target program occupies less memory space and runs fast, which is irreplaceable in advanced languages.

Compilation and interpretation languages:

Computers cannot directly understand high-level languages, but can only directly understand machine languages. Therefore, they must translate high-level languages into machine languages so that computers can write programs in High-level languages.

There are two translation methods: Compilation and interpretation. The two methods only have different translation time. Before executing a program written in a compiled language, a special compilation process is required to compile the program into a machine language file, such as an EXE file. If you want to run the program later, you do not need to re-translate it, you can directly use the compiled result (exe file). Because only one translation is performed and no translation is required during running, the execution efficiency of the compiled language program is high.

Different interpretations: The program of an explanatory language does not need to be compiled. It saves a lot of time for the process and can be translated only when the program is running, for example, an explanatory BASIC language, there is a special interpreter that can directly execute the BASIC program. Each statement is translated only when it is executed. In this way, each execution of an explanatory language requires a translation, which is less efficient.

Java is very special. Java programs also need to be compiled, but not directly compiled as the machine language. Instead, compilation is called bytecode and then executed in an interpreted way.

 

Computers cannot directly understand advanced languages, but can only directly understand machine languages. Therefore, they must translate advanced languages into machine languages before they can execute programs written in advanced languages.
There are two translation methods: Compile and explain.
Before executing a program written in a compiled language, a special compilation process is required to compile the program into a machine language file. If you want to run the program later, you do not need to translate it repeatedly, use the compiled result directly. High program execution efficiency, depending on the compiler, poor cross-platform performance. Such as C, C ++, and Delphi.
An interpreter is used to translate a program when it runs. Each statement is translated only when it is executed. Low Efficiency, dependency interpreter, and good cross-platform performance, such as basic.
The scripting language is between HTML, C, C ++, Java, C #, and other programming languages.
HTML is usually used to format and link text. Programming languages are usually used to send a series of complex commands to machines.
There are many similarities between scripting and programming languages. Their functions are similar to programming languages, and they also involve variables. The biggest difference with programming languages is that the syntax and rules of programming languages are stricter and more complex.
The relationship between scripts and program code: scripts are also a language, which is also composed of program code. Note: The script language generally has a corresponding Script Engine for interpretation and execution. They generally need interpreters to run. Javascript, ASP, PHP, and Perl are all scripting languages. After C/C ++ is compiled and linked, an independent EXE file can be generated.
A scripting language is an explanatory language, such as VBScript, JavaScript, and InstallShield script. Unlike C \ c ++, it can be compiled into binary code and can exist in the form of executable files.
The script language does not need to be compiled. It can be directly used and interpreted by the interpreter.
A script language generally exists in the form of text, similar to a command.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.