Dynamic language, dynamic type language, static type language, strong type language, weak type language Introduction _ Other synthesis

Source: Internet
Author: User

On the title of these concepts, most people should be more familiar with, but I fainted for a long time, so write down to deepen the impression.

1. Dynamic language

Also known as the Dynamic programming language, the program can change its structure when it runs: New functions can be introduced, existing functions can be deleted, and so on in the structural changes. For example, the well-known ECMAScript (JavaScript) is a dynamic language. In addition, such as Ruby, Python are also belong to the dynamic language, and C, C + + and other languages are not dynamic language.

In fact, we usually say "dynamic language" should refer to the "Dynamic type language." At least that's what I've always thought.

2. Dynamic type language

At run time, determine the type of language.
That is, the compile-time is independent of the type. Generally, you do not need to declare a variable type before a variable is used, and the type of the variable is usually determined by the type of the value being assigned. such as PHP, Python, and Ruby.

3. Static potent language

In contrast to the dynamic type language, you need to determine the type of language at compile time. That is, when writing a program, you need to explicitly declare the variable type. such as C + +, Java, C # and so on.

For the distinction between dynamic and static languages, apply a popular phrase: static typing when possible, dynamic typing when needed.

4. Strongly typed language

The language that enforces the data type definition. That is, once a variable is assigned a data type, it is always the data type if it is not cast.
A strongly typed definition language is a type-safe language.

5. Weak type definition language

The language to which the data type can be ignored. Instead of a strongly typed definition language, a variable can assign values of different data types.
A strongly typed definition language may be slightly inferior to a weak type definition language in speed, but the rigor brought by a strong type definition language can effectively avoid many errors.
In addition, from the top to see "This language is not a dynamic type language" and "This language is the type of security" is completely no connection between!

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.