Magic lies here - Statically vs Dynamically Typed Languages

Type Checking

a = “5” + 2;

Static typed languages

Type declaration constraints

Java Example

int data;
data = 50;
data = “Hello World!”; // causes an compilation error

Advantages:

Dynamically typed languages

Type declaration constraints

Python Example

data = 10;
data = “Hello World!”; // no error caused

Advantages:

Strongly typed languages

Python is strong-typed, and so is Java.

Python Example

temp = “Hello World!”
temp = temp + 10; // program terminates with below stated error

Weakly typed languages

PHP is weakly-typed, and so is C.

PHP Example

$temp = “Hello World!”;
$temp = $temp + 10; // no error caused
echo $temp;

Conclusion

UI Engineer@ Emirates National Bank Of Dubai

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store