Differences between compiled and interpreted type, dynamic language and static language, strong type language and weakly typed language

Source: Internet
Author: User

Tag: feature must be byte C + + to load advanced language statements a dynamic language

(i) Compiled and interpreted languages

First, we distinguish between such a concept, a compiled language and an interpreted language. We are programmed with high-level languages (except for writing and machine languages), computers only understand and run machine language, so high-level languages must be translated into machine-language computers to run programs written in high-level languages. Translation methods are compiled and interpreted. Compiling requires a specialized compilation process, which translates the high-level language into machine language through the compilation system, and then runs the *.exe file directly, such as the C + + language, which is a typical compiled language.

Interpreted language is different, the interpretation of the language at the time of the translation, a special interpreter can translate the interpretation of the language into machine language, each statement is executed when the translation. Such an interpreted language should be translated once every time it is executed, which is less efficient. Such as VB, Python language.

Java is a compiler-interpreted language, it has a compiled language and interpretation of the characteristics of the language, in fact, the Java is the interpretation of the language, its compiler feature is to convert the *.java file into a *.class file, not like C directly compiled into machine language, and the JVM to * The translation of the. class file is interpreted. Bytecode files are loaded into memory, read an instruction, translate one, run one, the process is interpreted, this process is done by the Java virtual machine. The Java Development tool JDK provides two important commands to complete the compilation and interpretation (translation) process above. The two commands are Java.exe and Javac.exe, which load the Java class file and progressively compile the bytecode file, while the other command corresponds to the Java language Interpretation (Javac.exe) process. In order, the Java language is the process of compiling first and then interpreting execution.

(ii) Dynamic language and static language

Dynamic languages Do data type checking at run time, never specifying a data type, and when the first assignment is internally logged data types, such as Python, Ruby, are typical dynamic languages.

The static language is checked at compile time, when the program is written to declare the data type, such as C/c++,java are static.

(iii) Strong-type language and weakly-typed language

A strongly typed data type is immutable, and if it is not cast, it will always be the data type. The weak type is the language in which the data type can be ignored.

As Python is a strongly typed definition language with dynamic interpretation, Java is a statically compiled-interpreted strongly typed definition language.

Differences between compiled and interpreted type, dynamic language and static language, strong type language and weakly typed language

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.