Programming 101:types of programming languages
As we all know there are many programming languages e.g. java, C, javascript, Python and many others. However, before picking any programming language it is important to know which category it falls under. Knowing the category is pretty simple since there are only two:
Statically typed programming languages
Dynamically typed programming languages
Before defining the two categories let's first define type checking. Type checking is the process of verifying that the data types used in a program are consistent with the declaration rules of a programming language.
Statically typed programming languages are simply languages where you have to specify the type of variable you are using in your code. This is because type-checking in static programming languages occurs at compile time. See the example below.
Example:
In java
String x = ‘Stan’;
As seen in the example above we have to specify the type of the variable x otherwise there will be an error in our code.
On the other hand, Dynamically typed programming languages are languages where we don't have to specify the data type of the variables used in our code. Type checking occurs during time. eg
In Javascript:
Let name = ‘Stan’;
In the example above we don't have to specify the type of our variable and the code works fine.
Follow me for more javascript-related articles.