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