Differences between compiled languages, interpretive languages, and scripting languages

Source: Internet
Author: User

Computers do not understand high-level languages, and of course they cannot execute high-level languages directly. Computers can only understand machine language directly, so any language must be translated into machine language, and the computer can run programs written in high-level languages. I. Differences in translation and interpretation
There are two ways of translating, one is compiling, the other is explaining.
The two ways are only different in the time of translation. Compiled language written program before being executed, need a special compilation process, the program compiled into machine language files, such as EXE files, later to run without re-translation, directly using the results of the compilation (EXE file), because the translation is done only once, the runtime does not need to translate, Therefore, the program execution efficiency of the compiled language is high.
Interpretation is different, the interpretation of the language of the program does not need to compile, save the process, the interpretation of the language in the process of running the translation, such as the explanatory Basic language, a special interpreter can directly execute the BASIC program, each statement is executed when the translation. Such explanatory language should be translated once every time it is executed, and the efficiency is lower.
Second, scripting language
① scripting language (Javascript,vbscript, etc.) between programming languages such as HTML and c,c++,java,c#
HTML is commonly used for formatting and linking text. Programming languages are often used to send a series of complex instructions to the machine.
There are many similarities between the ② scripting language and the programming language, and its functions are similar to those of programming languages, and they involve variables as well. The biggest difference from programming languages is that the syntax and rules of a programming language are stricter and more complex.
③ Relationship to program code: script is also a language, which is also composed of program code
Note: Scripting languages generally have a corresponding scripting engine to interpret execution. They usually need an interpreter to run. Javascript,asp,php,perl are scripting languages. Compiled and linked by C/C + +, you can create an EXE file that executes independently.
④ scripting language is an explanatory language
For example, Vbscript,javascript,installshield script, and so on, it does not like C + + and so can be compiled into binary code, in the form of executable files exist. The scripting language does not need to be compiled, can be used directly, interpreted by the interpreter, but it needs to be translated every time, the execution speed is slow.
⑤ scripting languages are generally present as text, similar to a command
For example, if you set up a program called Aaa.exe, you can open the. js file with the extension.
You specify a set of rules (syntax) for the. js file, and when someone else has written the. js file, your program uses this rule to understand and respond to the author's intentions. So, this set of rules is the scripting language.

Differences between compiled languages, interpretive languages, and scripting languages

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.