Static:Dynamic and Strong:Weak Typing.

Static languages = statically typed language = type is known from program text.
Dynamic languages = dynamically typed language = type is known when program runs.

But, dynamic typing != weak typing.
And static typing != strong typing.

Strong typing = Variables have specific data types. Once you assign a variable to something, it is bound to that type.
Weak typing = Variables are not strictly bound to a given data type. Variable's value can be interpreted differently.

Static typing can also be weak, as in C.
Static typing can also be strong, as in Java.

Java is statically typed and strongly typed.
C is statically typed but weakly typed.
Python is dynamically typed and strongly typed.
PHP is dynamically typed but weakly typed.

A good read: https://prateekvjoshi.com/2014/10/03/static-vs-dynamic-typing/

No comments: