What is a scripting language? What is a compilation language? What is the difference between the two ?, Script language compilation

Source: Internet
Author: User

What is a scripting language? What is a compilation language? What is the difference between the two ?, Script language compilation

What is a scripting language?

 

A scripting language is a language between a markup language and a programming language, without the complex and rigorous syntax and rules of the programming language.

The script syntax is relatively simple and easy to master. It has many similarities with programming languages, and its functions are similar to programming languages. The biggest difference with programming languages is that the syntax and rules of programming languages are stricter and more complex.

The scripting language is an explanatory language, such as Python and javascript (currently used). 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 and can be used directly. It is explained by the interpreter.

 

What is a compilation language?

 

A compilation language requires a special compilation process before the program is executed. You do not need to re-compile the program during running. You just need to directly use the compilation result and run it independently from the language environment. High program execution efficiency and ease of use. However, once the program needs to be modified, it must first modify the source code, and then re-compile and generate a new target file for execution. Because it depends on the compiler, it is less cross-platform.

 

 

Differences between the two:

 

Different levels of Abstraction: The scripting language is more abstract. In the scripting language, there are advanced data structures, such as list and dictionary structures, and simple and convenient nesting and operations for such structures. The compilation language is clearly defined.

 

Different types: The scripting language defines the types loose, does not need to declare the types, and automatically checks the dynamic types at runtime. The compilation language is usually a strong type definition or a static definition, that is, the variable type is specified in the program.

Different execution methods: the script language is interpreted as the command is executed immediately. This completely removes the compilation process from the edit-compile-run loop. The program in the compilation language is compiled into executable binary.

 

The running speed is different: the script language is interpreted and executed. Each statement is interpreted and then executed. This is slower than the language for compilation and execution. The compilation language can be directly run because it is compiled into a machine code, so it runs faster.

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.