On the understanding of computer programming language

Source: Internet
Author: User

Language division of the underlying language machine language

Assembly Language Compilation

High-level language C + + java PHP python

High-level language-------compilers---------assembly language--------Interpreters-----------Machine languages



Overall

One, compiled language

definition: refers to with a dedicated compiler, For a specific operating platform (operating system), a high-level language source code is translated into binary machine code (with operands, instructions, and corresponding formats) that can be run directly by the hardware platform, This process is called compile ; the compiled executable file (. exe), which can be run on a relative platform (poor portability, but high efficiency).

After some programs have been compiled, it is also necessary to put other compiled, may need to assemble more than two target code to generate the final executable file, called link (to enable reuse of low-level code).

The typical compiled language is the C language, C + +, which we are very familiar with.

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), This bytecode can not be directly executed by the platform, the runtime needs to be interpreted by the interpreter as the corresponding platform binary machine code files; Most people think of Java as a compiled language, but we say that Java is a compiled language, and there is no mistake in interpreting the language.


Ii. Explanatory language

definition: Refers to the language in which the source program is interpreted as a machine code on a specific platform and executed immediately by a specialized interpreter, which is equivalent to mixing the compiled-link process of a compiled language together.

interpreted language 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.


Three, 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 execution file, but this process requires the participation of the interpreter, so say scripting languages are very much associated with interpreted languages. The scripting language is usually interpreted and the program is a text file.

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

corresponds to the language of the script, and the difference is:

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).



On the understanding of computer programming language

Related Article

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.