Static language and Dynamic language

Source: Internet
Author: User
Basic concept static language (strongly typed language)

A static language is a language that can be determined at compile time for a variable's data type, and most static type languages require that the data type be declared before the variable is used.
For example: C + +, Java, Delphi, C # and so on.

Dynamic language (weakly typed language)

A dynamic language is a language that determines the type of data at run time . A type declaration is not required before a variable is used, and the type of the variable is usually the type of the value being assigned.
such as Php/asp/ruby/python/perl/abap/sql/javascript/unix shell and so on.

Strongly typed definition language

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. For example: If you define an integer variable A, the program simply cannot treat a as a string type. A strongly typed definition language is a type-safe language.

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.

The difference between the two characteristics

A strongly typed language is a language that cannot be converted once the type of the variable is determined.
Weakly typed languages Conversely, the type of a variable is determined by its application context.

The advantages of static language
  1. Because of the type of mandatory declaration, which makes the IDE very strong code-aware, so in the implementation of complex business logic, the development of large-scale business systems, and those with long life-cycle applications, relying on the IDE to the development of the system is very secure;
  2. Because the static language is relatively closed, the infringement of the code by the third-party development package can be minimized;
The advantages of dynamic languages
    1. The mind is not bound, can play at will, put more energy on the product itself;
    2. Focus on the realization of business logic, thinking process is the realization process;

Static language and Dynamic 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.