Dynamic language, dynamic type language, static type language, strongly typed language, weakly typed language

Source: Internet
Author: User

About title These concepts, most people should be more familiar with, but I faint for a long time, so write down to deepen the impression.


1. Dynamic Languagealso known as the Dynamic programming language,means that the program can change its structure at run time: New functions can be introduced, existing functions can be deleted, and so on structural changes. such as the well-known ECMAScript (JavaScript) is a dynamic language. In addition, such as Ruby, Python and so on are also dynamic languages, and C, C + + and other languages are not dynamic language. In fact, we usually say "dynamic language" should refer to "Dynamic type language". At least I've always thought so.

2. Dynamic type languageat run time, determine the language of the type. that is, compile-time independent of type. Generally inyou do not need to declare a variable type before the variable is used, and the type of the variable is usually determined by the type of the assigned value. such as PHP,Python and Ruby.
3. Static and potent languageIn contrast to dynamic type languages, you need to determine the language of the type at compile time. The variable type needs to be explicitly declared when the program is written. such as C + +, Java, C # and so on.
for dynamic language and static language distinction, apply a popular word is: static typing when possible, dynamic typing when needed.

4. Strongly typed languages

Enforces the language of the data type definition. In other words, 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 data type can be ignored by the language. In contrast to strongly typed definition languages, a variable can assign values of different data types.
Strongly typed definition language may be slightly slower than weak type definition language, but the rigor of strong type definition language can effectively avoid many errors.

In addition, it is clear from the top that "this language is not a dynamic type language" and "whether the language is type-safe" is completely no connection!



Dynamic language, dynamic type language, static type language, strongly typed language, 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.