Three types of compiling language, interpretive language and scripting language

Source: Internet
Author: User
Tags data structures requires

In the process of learning a variety of high-level programming languages, we always encounter some language types of nouns, understanding these nouns for our understanding of the operating mechanism of high-level language is very helpful.


first, the compiled language

Definition: Refers to the use of a dedicated compiler for a specific operating platform (operating system) to translate a high-level language source code into a hardware platform directly run by the binary machine code (with operands, instructions, and the corresponding format), this process is called compiling , a compiled executable file (. exe) that can run on a relative platform (poor portability, but high efficiency).

Some programs compile, but also need to put other compiled, may need to assemble more than two target code to generate the final executable file, called the link (can achieve the reuse of low-level code).

Typical compiler language has, we are very familiar with C language, C + + and so on.

In addition, the Java language is a very special language, the Java program needs to compile steps, but does not generate a platform-specific binary machine code, it compiles a platform-independent bytecode file (*.class) (The reason for good portability), such bytecode can not be directly executed by the platform, The runtime needs to be interpreted by the interpreter as a binary machine code file of the corresponding platform; most people think Java is a compiled language, but we say that Java is a compiled language, and it is also an interpreted language.


ii. Explanatory language

Definition: A language in which the source program is interpreted on a line-by-row basis and executed immediately by a specialized interpreter, which is equivalent to mixing the compiled-link process of a compiled language together.

Interpreted language execution is inefficient and cannot be run out of the interpreter, but its cross-platform type is relatively easy and requires only a specific interpreter.

The common interpretive language is that the author is learning Python (also scripting language) with Ruby and so on.


third, scripting language

Definition: A computer programming language created to shorten the traditional authoring-compile-link-run (edit-compile-link-run) process.

It is characterized by: The program code is the final executable file, but this process requires the participation of interpreters, so that the scripting language and interpretation of the language has a great connection. The scripting language is usually interpreted and the program is a text file.

Typical scripting languages are, Javascript,python, and so on.

corresponding to the scripting language is the system language, their differences are:

1, the level of abstraction: this is the most important and most obvious difference. The scripting language provides a more advanced abstraction for programmers. This is evident in the fact that, in the language itself, there are advanced data structures, such as lists and dictionary structures, and simple nesting and manipulation of this structure. This will create a very successful program.

2. Type definition: System languages are usually strongly typed and static type definitions. This means that the types of all variables are specified in the program and checked at compile time. Instead, the scripting language is the most loosely typed definition, with no type declaration at all, and dynamic type checking at run time.

3, implementation: the characteristics of the system language is compiled. The program is compiled into an executable binary. On the other hand, the scripting language is characterized by an explanation, that is, the instruction is executed immediately, and there is no intermediate state of the compilation. This means that the scripting language is interactive (you can just typed the command at the prompt and see the result), which is another big victory. This completely removes the compilation process from the edit-compile-run loop.

4, Speed: Above three points is the scripting language on the one hand in speed and efficiency, on the one hand, ease of use and expression of the power of a compromise between the typical example. This allows the scripting language to execute at an order of magnitude slower than the system language. This is the most defamatory aspect of scripting language. The degradation of performance is not a real problem, because the idea is to use scripting languages to assemble components that are written in a fast system language like C. So everything that needs to run fast will run fast because it is implemented in a fast language. Scripting languages are used only to tie things together, and these are usually not performance bottlenecks (or if so, you need to recheck your design).



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.