Static & Dynamic Programming Languages
All languages are designed to translate human-readable code into machine instructions.
graph LR;
id1[Source Code] --> id2[Compile Time]
id2 --> id3["Executable File"]
id3 --> id4["Run Time"]
Static Language
Type checking occurs at compile time.
A variable doesn’t need to be defined before it is used.
Static Languages: Java, C++
// C++ Example
int UniqueName;
uniqueName = 5;
Dynamic Language
Type checking occurs at runtime.
Variables must be defined before they are used.
Dynamic Languages: Javascript, PHP
// PHP Example
$txt = "Hello world!";
Strong Typing
Variables are bound to a data type.
// C++ Example
int UniqueName;
uniqueName = "String"; // Throws error, variable can only have integers
Weak Typing
Variables are not bound to a data type.
# GDScript Example
var item = 5;
item = "Hello" # Data type can be changed for variable
Godot Tutorials Resources