A strong type of language
A strongly typed language is a language that enforces type definitions, and once a variable is defined type, it is always the data type if it is not cast, and strongly typed languages include Java,. NET, Python, C + +, and so on.
For example, if you define an integer, you cannot convert the integer to a string without forcing the type conversion.
Second, weak type language
A weakly typed language is a weakly typed language defined by a variable that can be automatically converted according to the changes in the environment, without the need for a dominant cast. Weak type language includes VB, PHP, JavaScript and other languages.
As an example:
[HTML]View PlainCopy
- var A =5;
- var B = "5";
- Sumresult = A +b;
- Minresult = A- b;
The answer to input sumresult is not 10, but 55, and again the type of a is converted to a string and then spliced. The answer to input minresult is 0, which is to convert the type of B to a number and then subtract.
Three, strong type language and weak type language difference
Whether it is a strongly typed language or a weakly typed language, the fundamental criterion of discrimination is whether the language type can be changed implicitly. Strongly typed languages are slightly slower than weakly typed languages, but the rigor of strongly typed definition languages can avoid unnecessary errors.
79464196
Weakly typed languages and strongly typed languages