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
- 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;
- 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
- The mind is not bound, can play at will, put more energy on the product itself;
- Focus on the realization of business logic, thinking process is the realization process;
Static language and Dynamic language