Major Types of Programming Languages (with Examples and Use Cases)

Types of programming languages

There are thousands of programming languages available (almost 9,000 by some counts). [1]

Choosing an appropriate programming language to learn, therefore, can be daunting especially if you are learning to program by yourself.

Having the ability to classify programming languages into types can help you to quickly understand the characteristics of a programming language even if you are not familiar with it.

By understanding its general features as well as its strengths and weaknesses, you can decide whether it is appropriate for the task you want to accomplish.

But first, what are programming languages?

Programming languages are languages that programmers use to communicate with computers.

They provide us with a way to issue instructions to computers so that they can do what we want them to do. You can think of programming languages as a link between machine language and human language. [2]  

Here are some characteristics of programming languages.

  • They have special syntax and follow a set of rules for organizing computer instructions.
  • They range from abstract code in 1’s and 0’s (such as machine code) to human-readable languages (such as high-level languages like Python).
  • The human-readable languages need to be translated into computer-friendly language (machine code).

These three major characteristics form the basis for classifying programming languages. Although there are many ways of classifying programming languages, [4]   the most popular ways are by:

  • Programming paradigm (i.e. the style, rules, and organization of a programming language).
  • Level of abstraction (i.e. how close a programming language is to machine code).
  • Translation method (i.e. the method used to translate high-level languages into machine code).

In this article, I will explore:

  • The different ways in which programming languages are classified.
  • Examples of programming languages that fit each type of classification.
  • The best use cases for the different types of programming languages.

By the time you are done with the article, you should be able to have an idea of where popular programming languages fit and where they are best used.

1. Classifying by Programming Paradigm

A programming paradigm is a certain way or style of programming. [3]  

You can classify programming languages into four major types based on their programming paradigm (although there are many more programming paradigms).

>> Types of programming languages based on programming paradigm

The main types of programming paradigms are imperative and declarative programming paradigms and these four paradigms fall in either of the two categories as follows:

  • Procedural and object-oriented programming use the imperative style of programming.
  • Functional and logic programming use the declarative style of programming.
Major programming paradigms

#1. Procedural Programming Languages

Procedural programming is a style of imperative programming where the program is divided into a smaller set of instructions called procedures (or subroutines). [5]

Examples of languages that use procedural programming include C, C++, FORTRAN, and BASIC among many others. [4]

Procedural programming is used in all kinds of programming including developing operating systems (such as Linux), creating enterprise software (such as MS Office), and creating database applications (such as MySQL).

If you wish to get started with procedural programming using Python, check out the Introduction to Python Programming certificate course from Georgia Tech University (available on Edx).

#2. Object-oriented Programming Languages

Object-oriented programming (OOP) is a style of imperative programming that uses the concept of objects (i.e. an entity that contains attributes and functions). [3] [5]

Examples of programming languages that used object-oriented programming include Python, PHP, Java, and C++ among many others. [4]

Object-oriented programming is used in a variety of use-cases and programming paths including mobile development, desktop development, and database development.

If you wish to get started with object-oriented programming, check out the Introduction to Object-Oriented Programming with Java certificate course from Georgia Tech University (Available on Edx).

#3. Functional Programming Languages

Functional programming is a style of declarative programming that uses pure functions (i.e. functions that always return the same result when you pass the same arguments). [3] [6]

Examples of purely functional languages include: Haskell, Elm, and PureScript [4]

Functional programming is used in various programming paths such as data science (especially big data), parallel computing, and machine learning. It has also been widely used in telecommunications.

If you want to get started with functional programming, check out the Functional programming using Scala course on Coursera.

#4. Logic Programming Languages

Logic programming is a style of declarative programming where statements express facts and rules about problems within a system of formal logic. [6]

Examples of logic programming languages include Prolog, Datalog, and ASP.  [4]

Logic programming is great for use cases where you need to translate logic into code such as in expert systems, artificial intelligence, and fault diagnosis.

If you wish to get started in logic programming, check out the Prolog Zero to Hero course on Udemy.

Further reading: For an in-depth look at the programming paradigms including their pros and cons as well as their use cases, see my article on Programming Paradigms Explained.

2. Classifying by Level of Abstraction

In programming, abstraction hides unnecessary steps or implementation so that users see only the required information. The goal of abstraction is to reduce complexity.

You can classify programming languages based on their level of abstraction.

>> Types of programming languages based on level of abstraction

Programming languages can be classified into two types based on their level of abstraction. [7]

  • Low-level languages
  • High-level languages

#1. High-Level Programming Languages

Programming languages with a high level of abstraction, read more like English because certain steps or sub-routines are hidden from the user of the language. This makes it easier to work with the language. [7]

Examples of high-level programming languages include Python, JavaScript, C, C++, and many other modern programming languages. [7]

High-level programming languages are popular and are used for all kinds of programming including web development, mobile development, data science, and machine learning among many other uses.

#2. Low-Level Programming Languages

Programming languages with a low level of abstraction use machine code or language close to machine code. This means that they need little or no translation and are therefore faster. [7]

Examples of low-level programming languages include Assembly Language and Machine Code. [7]

These days, low-level programming languages are not commonly used but you can find them in device drivers development and embedded systems.

3. Classification by Translation Method

High-level computer languages need to be converted into a language that computers can understand (i.e. binary). This is done using compilers, interpreters, and assemblers. [7]

Compilers and interpreters are used to translate high-level languages while assemblers translate assembly language.

You can use the translation method to classify programming languages.

>> Types of Programming languages based on translation method

There are two main types of languages based on the translation method.

  • Compiled languages
  • Interpreted languages

#1. Compiled Programming Languages

Compiled languages are converted into machine language using a compiler before they are executed. [8] Examples of compiled languages include C, C++, Go, and C#. [4]

Compiled languages tend to be faster during execution because they are compiled beforehand. They are therefore great for applications that require speed and efficient resource use. [8]

They are used in all kinds of programming paths including mobile development, desktop development, blockchain development, and embedded systems.

#2. Interpreted Programming languages

Interpreted languages are converted into machine code at run-time. [8] Examples of interpreted languages include Python, Ruby, and JavaScript. [4]

Interpreted languages are slower because they are translated as they run. They are easier to learn and are great for rapid prototyping. [8]

They are widely used in various programming paths such as web development, scripting, and machine learning.

Wrapping Up

Hopefully, this article has shed some light on how programming languages are classified.

There are many other ways that programming languages can be classified [4]   but I have focused on the most popular for the sake of simplicity.

If you are interested in getting into programming, check out the following articles.