Programming languages are tools used to communicate with and between computers and humans. They are designed with a syntax and its own rules to be able to solve problems and perform a task.
There are over 100 different kinds of programming language from A to Z but in this post we will be classifying them into certain categories.
Classification of Programming Languages
Programming languages can be classified as follows;
- By Paradigms
- By closeness in relation to the machine/computer
- By Type checking
- By Type freedom
By Closeness in relation to the machine/computer
- Low Level languages.eg Machine code (0,1) and Assembly language Low-level languages interact directly with the computer processor or CPU, are capable of performing very basic commands, and are generally hard to read. Machine code, one example of a low-level language, uses code that consists of just two numbers — 0 and 1. Assembly language, another low-level language, uses keywords to perform basic commands like read data, move data, and store data.
- High Level languages eg. all the rest They make it easier for programmers to use natural language to interact with the computer. High-level languages use natural language so it is easier for people to read and write. Once code is written in a high-level language, like C++, Python, or Ruby, an interpreter or compiler translates this high-level language into low-level code a computer can understand.
By Paradigms
Imperative Programming languages
You instruct the computer on HOW TO do a task or change a state Reads like a list of steps to solve the problem or perform the task eg. C,C++,Java
- Procedural Programming
- Groups instructions of how to do the task into procedures
- eg. C, Basic
- Object Oriented Programming
- Groups instructions into objects
- Can also be OOP with functions eg.Scala,OCalm
Declarative Programming languages
In declarative programming languages, you declare to the computer WHAT TO do or the properties of the desired state but not how to compute it.
It is more like a function.
- Functional Programming
- Constructed by composing functions
- eg. Haskell,Lisp
- Logical Programming
- Constructed through a set of logical connections
- eg. Prolog,SQL
- Constructed through a set of logical connections
By Typed
Dynamically Typed
- Type checking is defered to runtime
- You do not know the type until at runtime
- eg. Javascript,Python,Julia,Ruby,Objective C
Python
def addnum(x,y):
result = x + y
return result
Ruby
def addnum(x,y)
result = x + y
return result
end
Julia
function addnum(x::Int,y::Int)
result = x + y
return result
end
Static Typed
- Type checking is done before running the program at compile time
- You specify the types before running the program
- eg. C,C++,Java,Go
C
#include
int addnum(int x,int y)
{
int result;
result = x + y;
return result;
}
Golang
package main
import "fmt"
func addnum(x,y int) int{
var result int
result = x + y
return result
}
func main(){
a:= 2
b:= 3
addnum(a,b)
}
By Freedom of Type
It can be weakly typed or strongly typed.
As you can see these are the main ways we can classify programming languages.
Thanks For Your Time and Attention
By. Jesse E.Agbe(JCharis)
Jesus Saves
Bookmarked!, I like your web site!
First time visiting your website, I really like it!
Thanks Nickolas, Glad you find it useful.