Write a * a + b * b in C, Java and Python and you get three very different things. GCC turns it into ten bytes of x86-64 machine code. The Java compiler turns it into eight bytecode instructions that accept only integers. Python turns it into a handful of bytecode instructions that will try to multiply whatever they are given. The syntax barely differs; what happens to the code does, and that is what the types of programming languages describe.
This guide covers the five ways languages are classified: by level, by paradigm, by how they run, by how they check types and by how they manage memory. Each one comes with real code and real output, including one small task written in five paradigms. Every program was compiled or run for this article on Ubuntu 24.04: C with GCC 13.3 and Clang 18.1, C++23 with g++ 13.3 and clang++ 18.1, Java with OpenJDK 21, Python 3.15.0, Haskell with GHC 9.4.7, SQL on SQLite 3.45, Prolog on SWI-Prolog 9.0.4, JavaScript on Node.js 22 and Rust 1.97. The compiled programs build with warnings enabled and no warnings, except where a warning is the point, and every output block is captured verbatim.
The Short Answer
What are the main types of programming languages? By level, there are three: machine code, assembly language and high-level languages. By paradigm, there are five main styles: procedural, object-oriented, functional, declarative and logic. Lists of “three types” or “four types” are usually using one of these two classifications.
Is there one correct classification? No. A language has a place on several independent axes at once. C is high-level, procedural, compiled to machine code, statically and weakly typed and uses manual memory management. Python differs from C on four of those five.
Which classification matters when you choose a language? Usually not the paradigm. How a language runs, how it checks types and who frees memory decide its speed, its safety and the kind of bugs you will spend time on.
What Is a Programming Language?
A programming language is a formal language with exact rules for writing instructions a computer can carry out. A compiler, an interpreter or both translate those instructions into machine code, the binary instructions a processor executes. Languages differ in how close they sit to the hardware and in how they organize code, run, check types and manage memory.
The word “formal” matters. A programming language has a grammar with no ambiguity, so the same source code always means the same thing. That is why English, however precise, is not a programming language, and why tools that turn plain English into code still produce code in an ordinary language such as Python or C.
Not every computer language is a programming language. HTML and CSS describe documents and their appearance but cannot express a general computation; TIOBE’s index definition excludes HTML for exactly that reason, since it requires a language to be Turing complete. SQL is a borderline case: it is a query language, but standard SQL with recursive queries can express any computation, and it appears in most programming language rankings.
How Programming Languages Are Classified
There is no single taxonomy. Five independent questions cover almost every classification you will meet:
| Axis | The question it answers | Main types |
|---|---|---|
| Level | How close is the code to the hardware? | Machine code, assembly, high-level |
| Paradigm | How is a program organized? | Procedural, object-oriented, functional, declarative, logic |
| Execution | How does the code run? | Compiled to machine code, bytecode on a virtual machine, interpreted |
| Typing | When and how strictly are types checked? | Static or dynamic; strong or weak |
| Memory | Who frees memory that is no longer needed? | Manual, garbage collected, ownership checked by the compiler |
Most real languages are mixed on at least one axis. C++ and Python support several paradigms, Java is compiled to bytecode and then compiled again while it runs and TypeScript adds static types to a dynamically typed language. Figure 1 places C and Python on each axis.
Low-Level vs High-Level Languages
The oldest classification sorts languages by how much of the hardware they expose.
- Machine code (also called machine language, or a first-generation language) is the binary instructions a processor executes directly. Each processor family has its own: x86-64 machine code does not run on an ARM chip.
- Assembly language (second generation) gives each machine instruction a readable name, such as
imulfor integer multiply. An assembler translates it one to one into machine code. It is just as specific to one processor family. - High-level languages (third generation and later) describe computations in terms of variables, functions and data structures. A compiler or interpreter translates them, so the same source can run on different processors.
You can watch the translation happen. Here is a one-line C function:
// square.c - one small C function, to compare with its assembly and machine code.
int square_sum(int a, int b)
{
return a * a + b * b;
}
GCC at -O2 turns it into four assembly instructions (gcc -O2 -fcf-protection=none -S -masm=intel, directives removed; without -fcf-protection=none, Ubuntu’s GCC adds a 4-byte endbr64 security instruction at the start):
square_sum:
imul edi, edi
imul esi, esi
lea eax, [rdi+rsi]
ret
The assembler turns those into machine code. objdump shows the bytes next to each instruction:
0000000000000000 <square_sum>:
0: 0f af ff imul edi,edi
3: 0f af f6 imul esi,esi
6: 8d 04 37 lea eax,[rdi+rsi*1]
9: c3 ret
The whole function is ten bytes. The first three, 0F AF FF, are what the processor reads as “multiply register edi by itself”. Nobody writes programs in hex bytes any more, and few people write whole programs in assembly; it survives in operating system kernels, bootloaders, hand-tuned math libraries and code that must use a specific processor instruction. Assembly language still ranks 17th in the November 2026 TIOBE Index, and reading it is a routine part of debugging and optimizing compiled code.
Is C a middle-level language? You will often see C and C++ called “middle-level”. It is an informal label, not a separate type. By the standard definition C is a high-level language: it is portable and compiled, and the same source runs on any processor with a C compiler. It earns the nickname because its operations map closely onto machine instructions, as the example shows, and because it lets you work with memory addresses directly.
You may also meet fourth-generation (4GL) and fifth-generation (5GL) languages. The terms date from the 1970s and 1980s: 4GL meant languages that describe what result you want, such as SQL and report generators, and 5GL meant languages that solve problems from constraints, such as Prolog. They are better described today by their paradigm, which is the next classification. For how the generations came about, see the history of famous programming languages and their authors.
Programming Paradigms: One Task, Five Ways
A programming paradigm is a style of organizing a program: what the program is made of and how it gets from input to result. The clearest way to see the difference is to solve one problem in each style.
The task: given five orders, add up the amounts of the orders worth 100 or more. The answer is 570 (120 + 300 + 150).
Imperative and Procedural: C
An imperative program is a sequence of steps that change the program’s state, usually the values of variables. Procedural programming is imperative programming organized into procedures, or functions. C, Pascal, Fortran and Go are mainly procedural.
// orders.c - imperative, procedural style: step-by-step instructions
// that change variables, grouped into a function.
#include <stdio.h>
struct order {
const char *customer;
int amount;
};
int total_large_orders(const struct order *orders, int count, int minimum)
{
int total = 0;
for (int i = 0; i < count; ++i) {
if (orders[i].amount >= minimum)
total += orders[i].amount;
}
return total;
}
int main(void)
{
const struct order orders[] = {
{"Ada", 120}, {"Linus", 45}, {"Grace", 300}, {"Ken", 80}, {"Bjarne", 150},
};
const int count = (int)(sizeof orders / sizeof orders[0]);
printf("Orders of 100 or more: %d\n", total_large_orders(orders, count, 100));
return 0;
}
Output:
Orders of 100 or more: 570
The function says how to get the answer: start a total at zero, look at each order in turn, add the amount if it is large enough. The variable total changes on every matching step. This is the closest of the five styles to how the processor itself works, which is one reason procedural code is easy to follow and easy to make fast.
Object-Oriented: Java
An object-oriented program is made of objects that hold data together with the methods that work on it. Callers ask an object to do something instead of reaching into its data. Java, C#, Kotlin and Smalltalk are built around objects; C++, Python and JavaScript support them alongside other styles.
// Orders.java - object-oriented style: data and the behavior that uses it
// live together in objects, and callers work through their methods.
import java.util.ArrayList;
import java.util.List;
public class Orders {
record Order(String customer, int amount) {
boolean isAtLeast(int minimum) {
return amount >= minimum;
}
}
static class OrderBook {
private final List<Order> orders = new ArrayList<>();
void add(String customer, int amount) {
orders.add(new Order(customer, amount));
}
int totalAtLeast(int minimum) {
int total = 0;
for (Order order : orders) {
if (order.isAtLeast(minimum)) {
total += order.amount();
}
}
return total;
}
}
public static void main(String[] args) {
OrderBook book = new OrderBook();
book.add("Ada", 120);
book.add("Linus", 45);
book.add("Grace", 300);
book.add("Ken", 80);
book.add("Bjarne", 150);
System.out.println("Orders of 100 or more: " + book.totalAtLeast(100));
}
}
Output:
Orders of 100 or more: 570
The loop inside totalAtLeast is still procedural. What changed is where the code lives. The list of orders is private to OrderBook, each Order decides for itself whether it is large enough and main never touches the list directly. That structure pays off as a program grows, because the rules for an order sit in one place. The object-oriented programming guide covers classes, encapsulation, inheritance and polymorphism in detail.
Functional: Haskell
A functional program builds its result by applying and combining functions, without changing variables. Data is immutable: instead of updating a list, you produce a new one. Haskell is purely functional; Lisp, Clojure, Elixir, F# and OCaml are functional first, and most modern languages have borrowed functional features.
-- orders.hs - functional style: no variable is changed; the result is
-- built by composing functions (map, filter, sum) over immutable data.
data Order = Order String Int -- customer, amount
amount :: Order -> Int
amount (Order _ a) = a
orders :: [Order]
orders = [Order "Ada" 120, Order "Linus" 45, Order "Grace" 300, Order "Ken" 80, Order "Bjarne" 150]
totalAtLeast :: Int -> [Order] -> Int
totalAtLeast limit = sum . filter (>= limit) . map amount
main :: IO ()
main = putStrLn ("Orders of 100 or more: " ++ show (totalAtLeast 100 orders))
Output:
Orders of 100 or more: 570
totalAtLeast has no loop and no variable that changes. It is three functions joined by . (function composition), read from right to left: take each order’s amount, keep the ones of at least limit, add them up. Because nothing is modified, the function always returns the same result for the same input, which makes functional code easy to test and safe to run in parallel.
Declarative: SQL
A declarative program describes the result you want and leaves the steps to the language’s engine. SQL is the most widely used declarative language; HTML, CSS, regular expressions and build files such as Makefiles are declarative too, though they are not general-purpose programming languages. Functional and logic programming are also counted as declarative styles.
-- orders.sql - declarative style: describe the result you want;
-- the database decides how to find it.
CREATE TABLE orders (customer TEXT, amount INTEGER);
INSERT INTO orders VALUES ('Ada', 120), ('Linus', 45), ('Grace', 300), ('Ken', 80), ('Bjarne', 150);
SELECT 'Orders of 100 or more: ' || SUM(amount)
FROM orders
WHERE amount >= 100;
Output (sqlite3 :memory: < orders.sql):
Orders of 100 or more: 570
The query says what: the sum of amount over the rows where amount >= 100. It says nothing about loops, order or indexes. The database chooses how to find the rows, and with an index on amount it would choose differently without any change to the query.
Logic: Prolog
A logic program states facts and rules, then asks questions. The language searches for every answer that makes the rules true. Prolog is the best-known logic language; Datalog, a simpler relative, is used inside some databases and code-analysis tools.
% orders.pl - logic style: state facts and rules, then ask a question.
% Prolog searches for every answer that makes the rule true.
order(ada, 120).
order(linus, 45).
order(grace, 300).
order(ken, 80).
order(bjarne, 150).
large_order(Customer, Amount) :- order(Customer, Amount), Amount >= 100.
main :-
findall(Amount, large_order(_, Amount), Amounts),
sum_list(Amounts, Total),
format("Orders of 100 or more: ~w~n", [Total]),
findall(Customer, large_order(Customer, _), Customers),
format("Placed by: ~w~n", [Customers]).
:- initialization(main, main).
Output (swipl orders.pl):
Orders of 100 or more: 570
Placed by: [ada,grace,bjarne]
There is no function that computes the total. large_order is a rule: an order is large if it exists and its amount is at least 100. findall asks Prolog for every Amount that satisfies the rule. The second question reuses the same rule to ask something else, which customers placed large orders, with no new code. Running a rule “backwards” like this is what sets logic programming apart.
Multi-Paradigm Languages: C++
A multi-paradigm programming language supports several programming styles and lets you mix them in one program. C++, Python, JavaScript, Rust, Kotlin and Scala are all multi-paradigm. Most popular languages today are, which is why “which paradigm is this language?” often has more than one answer.
C++ can solve the same task three ways in one file:
// orders.cpp - a multi-paradigm language: the same task three ways in C++.
#include <algorithm>
#include <iostream>
#include <numeric>
#include <ranges>
#include <string>
#include <vector>
struct Order {
std::string customer;
int amount;
};
// Object-oriented: a class keeps its data private and exposes behavior.
class OrderBook {
public:
void add(std::string customer, int amount) { orders_.push_back({std::move(customer), amount}); }
int total_at_least(int minimum) const
{
int total = 0;
for (const Order& o : orders_) // procedural loop inside a method
if (o.amount >= minimum)
total += o.amount;
return total;
}
const std::vector<Order>& orders() const { return orders_; }
private:
std::vector<Order> orders_;
};
int main()
{
OrderBook book;
for (auto [name, amount] : {std::pair{"Ada", 120}, {"Linus", 45}, {"Grace", 300}, {"Ken", 80}, {"Bjarne", 150}})
book.add(name, amount);
// 1. Object-oriented call (with a procedural loop inside).
std::cout << "OOP method: " << book.total_at_least(100) << '\n';
// 2. Functional style: a pipeline of views, no variable is modified.
auto large = book.orders() | std::views::transform(&Order::amount)
| std::views::filter([](int a) { return a >= 100; });
std::cout << "ranges pipeline: " << std::ranges::fold_left(large, 0, std::plus<>{}) << '\n';
// 3. Generic programming: one algorithm for any container and predicate.
const auto& v = book.orders();
std::cout << "std algorithm: "
<< std::accumulate(v.begin(), v.end(), 0, [](int sum, const Order& o) {
return o.amount >= 100 ? sum + o.amount : sum;
})
<< '\n';
}
Output:
OOP method: 570
ranges pipeline: 570
std algorithm: 570
The class is object-oriented, the loop inside it is procedural, the C++20 ranges pipeline is functional (nothing is modified until fold_left adds the values) and std::accumulate is generic programming: one algorithm that works with any container and any rule. The basics of C++ explains how these styles fit together in the language.
All six programs print 570. Here is how the paradigms compare:
| Paradigm | A program is | Changes state? | Example languages | Strong at |
|---|---|---|---|---|
| Procedural | Steps grouped into functions | Yes | C, Go, Pascal, Fortran | Speed, simplicity, systems code |
| Object-oriented | Objects that combine data and methods | Yes, inside objects | Java, C#, C++, Python | Large programs with many related types |
| Functional | Functions applied to immutable data | No | Haskell, F#, Elixir, Clojure | Data transformation, concurrency, testing |
| Declarative | A description of the result | Not visibly | SQL, HTML, CSS, regular expressions | Queries and configuration |
| Logic | Facts, rules and questions | No | Prolog, Datalog | Rules, search, constraint problems |
Compiled, Interpreted and Bytecode Languages
The third classification is about how code runs. There are three main models:
| Model | How the code runs | Typical languages | Trade-off |
|---|---|---|---|
| Compiled ahead of time | Translated to machine code before it runs | C, C++, Rust, Go, Swift | Fast start and execution; build per platform |
| Bytecode on a virtual machine | Compiled to bytecode, which a VM runs and often compiles to machine code while running (just-in-time, or JIT) | Java, Kotlin, C#, Python | One build runs anywhere the VM does |
| Interpreted from source | Read and executed directly, statement by statement | Shell scripts, early BASIC | No build step; slowest |
Strictly, this is a property of a language’s implementation, not of the language. There are C interpreters and ahead-of-time compilers for Java and C#, and some Python implementations use a full JIT compiler. The labels describe the usual way a language is run.
Java’s compiler produces bytecode for the Java Virtual Machine. Here is the same a * a + b * b function after javac, shown with javap -c:
public class Square {
static int squareSum(int a, int b) {
return a * a + b * b;
}
}
static int squareSum(int, int);
Code:
0: iload_0
1: iload_0
2: imul
3: iload_1
4: iload_1
5: imul
6: iadd
7: ireturn
Eight instructions, and imul and iadd are integer multiply and add: the types were fixed when the code was compiled. When this method runs often, the JVM’s JIT compiler turns it into native machine code much like the C version.
Python is usually called interpreted, but CPython compiles every function to bytecode first and interprets the bytecode. The dis module shows it:
import dis
def square_sum(a, b):
return a * a + b * b
dis.dis(square_sum)
Output (Python 3.15.0):
3 RESUME 0
4 LOAD_FAST_BORROW_LOAD_FAST_BORROW 0 (a, a)
BINARY_OP 5 (*)
LOAD_FAST_BORROW_LOAD_FAST_BORROW 17 (b, b)
BINARY_OP 5 (*)
BINARY_OP 0 (+)
RETURN_VALUE
RESUME is setup; the work is six instructions. The key difference from Java is BINARY_OP 5 (*). It is a generic multiply that decides at run time what * means for the values it receives, so the same bytecode multiplies integers, floats or anything else that supports *. That flexibility is a large part of why CPython is slower than Java or C for number crunching. CPython has shipped an experimental JIT compiler since Python 3.13; in Python 3.15, released in October 2026, the release announcement puts it at about 7 to 8% faster than the standard interpreter on x86-64 Linux (geometric mean).
One more target worth knowing is WebAssembly, a portable bytecode that browsers and other runtimes execute at near-native speed. C, C++, Rust and Go compile to it, and WebAssembly 3.0, completed in September 2025, added garbage collection support that makes it a practical target for Java, Kotlin and Dart as well.
The choice of compiler matters for compiled languages too; the guide to the best C++ compilers compares GCC, Clang and MSVC.
Static vs Dynamic, Strong vs Weak Typing
Typing is two separate questions that are often confused:
- Static or dynamic: are types checked when the program is compiled or while it runs? In a statically typed language, every variable has a type the compiler knows. In a dynamically typed language, values have types but variables do not, and mismatches are found when the code runs.
- Strong or weak: does the language refuse to mix types, or convert one into another silently? There is no strict definition, but the difference shows up clearly in practice.
The same mistake, adding a number to a string, in four languages:
// mix.c - C is statically but weakly typed: "52" + 1 is pointer arithmetic,
// so it compiles and silently skips the first character.
#include <stdio.h>
int main(void)
{
printf("[%s]\n", "52" + 1);
return 0;
}
Output:
[2]
C is statically but weakly typed. A string literal is an array, "52" + 1 is pointer arithmetic, and the program prints the string starting at its second character. It compiles, runs and is wrong if you meant to append. GCC 13.3 compiled it with -Wall -Wextra -pedantic and gave no warning. Clang 18.1 did warn:
mix.c:7:27: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
7 | printf("[%s]\n", "52" + 1);
| ~~~~~^~~
mix.c:7:27: note: use array indexing to silence this warning
7 | printf("[%s]\n", "52" + 1);
| ^
| & [ ]
1 warning generated.
// mix.js - JavaScript is dynamically and weakly typed: values are converted.
console.log("5" + 2);
console.log("5" - 2);
console.log("5" * "2");
Output:
52
3
10
JavaScript is dynamically and weakly typed, and it converts values to make an expression work. + with a string means concatenation, so "5" + 2 is "52". - and * have no string meaning, so the same strings become numbers and the results are 3 and 10. Three operators, two conversion rules: this is the classic source of JavaScript bugs, and the main reason TypeScript exists.
# mix.py - Python is dynamically but strongly typed: no silent conversion.
print(int("5") + 2)
print("5" + 2)
Output:
7
Traceback (most recent call last):
File "mix.py", line 3, in <module>
print("5" + 2)
~~~~^~~
TypeError: can only concatenate str (not "int") to str
Python is dynamically but strongly typed. It will not guess: you convert explicitly with int("5"), or you get a TypeError. But the error appears only when that line runs. The program printed 7 first, and a line that never runs in testing can carry the error into production.
// mix.rs - Rust is statically and strongly typed: the mistake is a compile error.
fn main() {
let total: i32 = "5" + 2;
println!("{total}");
}
Compiler output (rustc mix.rs):
error[E0369]: cannot add `{integer}` to `&str`
--> mix.rs:3:26
|
3 | let total: i32 = "5" + 2;
| --- ^ - {integer}
| |
| &str
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0369`.
Rust is statically and strongly typed: the mistake is a compile error, and no program is produced.
The run-time timing of dynamic typing is easier to see with a function. Here is square_sum from earlier, called three times in Python:
# dynamic.py - one Python function, three argument types. Types are checked
# while the program runs, when an operation is actually attempted.
def square_sum(a, b):
return a * a + b * b
print(square_sum(3, 4))
print(square_sum(1.5, 2))
print(square_sum("3", 4))
Output:
25
6.25
Traceback (most recent call last):
File "dynamic.py", line 8, in <module>
print(square_sum("3", 4))
~~~~~~~~~~^^^^^^^^
File "dynamic.py", line 4, in square_sum
return a * a + b * b
~~^~~
TypeError: can't multiply sequence by non-int of type 'str'
The first two calls work, with integers and with a float, because Python checks types only when * is actually applied. The third fails inside the function. In Java the third call would not compile.
| Typing | Weak (converts silently) | Strong (refuses to mix) |
|---|---|---|
| Static (checked at compile time) | C, C++ | Rust, Java, C#, Go, Haskell, Swift |
| Dynamic (checked at run time) | JavaScript, PHP, Perl | Python, Ruby |
Treat the strong/weak column as a spectrum. C++ is stricter than C, Java converts numbers to strings when you use + with a string and PHP 8 rejects more mixed operations than earlier versions did. Static typing is also creeping into dynamic languages: TypeScript for JavaScript and type hints checked by tools such as mypy for Python.
Memory Management: Manual, Garbage Collected and Ownership
The fifth axis has become the most debated one. Every program allocates memory; the question is who gives it back.
| Model | Who frees memory | Languages | Cost |
|---|---|---|---|
| Manual | The programmer, with free or delete | C, C++ (with RAII and smart pointers to automate it), assembly | Fast and predictable; mistakes cause crashes and security holes |
| Garbage collected | A runtime that finds and frees unreachable objects | Java, C#, Go, JavaScript, Python, Haskell | Safe; uses extra memory and some CPU time |
| Reference counted | Freed when the last reference disappears | Swift, Objective-C; Python alongside its collector | Predictable; cycles need extra handling |
| Ownership | The compiler proves when memory can be freed | Rust | Safe and fast; stricter rules to learn |
Manual memory management is where C and C++ get their speed and their best-known bugs: use after free, double free and buffer overflows. US agencies have been pushing industry toward memory-safe languages for several years. Joint guidance from CISA, the NSA and international partners in 2023 named C#, Go, Java, Python, Rust and Swift as examples, and CISA and the NSA published a joint guide on adopting memory-safe languages in June 2025. C++ is responding from inside: C++26, whose technical work finished in March 2026, adds a hardened standard library mode and turns reading an uninitialized variable from undefined behavior into “erroneous behavior”. Modern C++ already avoids most manual delete calls, as the C++ memory management guide shows.
General-Purpose, Domain-Specific and Scripting Languages
Two more labels describe what a language is for:
- General-purpose languages can be used for almost anything: C, C++, Java, C#, Python, Go, Rust.
- Domain-specific languages (DSLs) are designed for one job: SQL for databases, R for statistics, MATLAB for numerical work, Verilog for hardware, GLSL for graphics shaders. They do that job with far less code than a general-purpose language would need.
- Scripting languages are general-purpose or near-general-purpose languages used to automate tasks and glue other programs together: Bash, PowerShell, Python, Perl, Lua. The term describes how a language is used, not a technical property; Python is a scripting language in a build script and an application language in a web service.
- Markup and style languages, HTML, XML, Markdown and CSS, describe structure and appearance. They are computer languages but not programming languages.
Where Popular Languages Fit
Here is where common languages sit on every axis. “Usually runs as” describes the main implementation.
| Language | Level | Main paradigms | Usually runs as | Typing | Memory |
|---|---|---|---|---|---|
| Assembly | Low | Imperative | Assembled to machine code | Untyped | Manual |
| C | High (systems) | Procedural | Native machine code | Static, weak | Manual |
| C++ | High (systems) | Procedural, object-oriented, generic, functional | Native machine code | Static, weak | Manual, automated with RAII |
| Rust | High (systems) | Procedural, functional, generic | Native machine code | Static, strong | Ownership |
| Go | High | Procedural, concurrent | Native machine code | Static, strong | Garbage collected |
| Swift | High | Object-oriented, functional, protocol-oriented | Native machine code | Static, strong | Reference counted |
| Java | High | Object-oriented, functional | JVM bytecode with JIT | Static, strong | Garbage collected |
| Kotlin | High | Object-oriented, functional | JVM bytecode with JIT | Static, strong | Garbage collected |
| C# | High | Object-oriented, functional | .NET bytecode with JIT | Static, strong | Garbage collected |
| Python | High | Procedural, object-oriented, functional | CPython bytecode | Dynamic, strong | Reference counted plus collector |
| JavaScript | High | Prototype-based objects, functional, event-driven | JIT-compiled by the engine | Dynamic, weak | Garbage collected |
| TypeScript | High | Same as JavaScript | Compiled to JavaScript | Static (types removed when compiled) | Garbage collected |
| Haskell | High | Purely functional | Native machine code | Static, strong, inferred | Garbage collected |
| SQL | High (declarative) | Declarative | Inside a database engine | Declared column types | Managed by the database |
| Prolog | High (declarative) | Logic | Compiled to an abstract machine | Dynamic | Garbage collected |
How Popular Are These Languages in 2026?
Popularity depends on what you measure. The TIOBE Index for November 2026, which counts search engine results for each language, puts Python first at 20.86%, then C (11.48%), Java (8.89%), C++ (8.35%) and C# (3.39%). The 2026 Stack Overflow Developer Survey, which asks developers what they actually use, puts JavaScript first at 62%, followed by SQL, HTML/CSS and Python at about 58% each, with Rust rising to 12th.
The two lists disagree because they measure different things, but together they show that every type in this guide is in heavy use. Procedural C and multi-paradigm C++ sit near the top of TIOBE, the declarative SQL near the top of the survey and the dynamically typed Python and JavaScript at the top of both.
How to Choose a Type of Language
Start from the job, then let the job pick the type:
- Operating systems, embedded devices, game engines and performance-critical libraries: compiled systems languages, C, C++ or Rust.
- Web front ends: JavaScript, or TypeScript for static types on top of it.
- Data analysis, machine learning and automation: Python, with SQL for the data itself.
- Large business applications and Android: Java, Kotlin or C# on a garbage-collected runtime.
- Learning how computers work: a language close to the hardware teaches the most. That is the argument for learning C as a first programming language.
Learning one language from a second paradigm is worth more than a third language from the same one. Someone who knows C and Python understands far more of the table above than someone who knows Java and C#.
Key Takeaways
- Languages are classified on five independent axes: level, paradigm, execution model, typing and memory management. Every language has a place on each.
- By level there are three types: machine code, assembly and high-level languages. One line of C became four assembly instructions and ten bytes of machine code.
- By paradigm there are five main styles: procedural, object-oriented, functional, declarative and logic. All five solved the same task and got the same answer, 570, in very different shapes.
- Most popular languages are multi-paradigm. C++ solved the task three ways in one program.
- “Compiled” and “interpreted” describe implementations. Java and Python both compile to bytecode; Java’s bytecode fixes the types, Python’s decides them at run time.
- Static vs dynamic and strong vs weak are different questions. C (static, weak) accepted
"52" + 1and GCC did not warn; Python (dynamic, strong) refused"5" + 2but only when the line ran. - Memory management is now a safety question, with government guidance pushing new code toward memory-safe languages.
Frequently Asked Questions
Conclusion
The types of programming languages are less a set of boxes than a set of trade-offs. Closer to the hardware means more speed and more responsibility; static types catch mistakes earlier at the cost of more ceremony; garbage collection and ownership remove a whole class of bugs that manual memory management invites. Seen that way, a “new” language is rarely new: it is a different position on axes you already know.
The quickest way to make these differences real is to write the same small program in languages from two or three different columns of the table above and compare what each one makes you think about. More language guides and tutorials are in the programming section.
What I Verified
Every example in this article was compiled or run on Ubuntu 24.04 (x86-64) on 22 November 2026. The captured outputs were regenerated by one script before the article was assembled.
| Check | Result |
|---|---|
C examples, GCC 13.3 and Clang 18.1, -std=c17 -Wall -Wextra -pedantic -Werror | Built with no warnings; mix.c built without -Werror, since its Clang warning is the point |
C++ example, g++ 13.3 and clang++ 18.1, -std=c++23 -Wall -Wextra -pedantic -Werror | Built with no warnings |
Java (javac -Xlint:all -Werror, OpenJDK 21), Haskell (ghc -Wall -Werror, GHC 9.4.7) | Built with no warnings |
| SQL (SQLite 3.45), Prolog (SWI-Prolog 9.0.4), Python 3.15.0, Node.js 22, Rust 1.97 | Run; outputs captured verbatim, file paths removed |
| Same result from all paradigm programs | 570 from C, Java, Haskell, SQL and Prolog, and from all three C++ versions |
| AddressSanitizer and UndefinedBehaviorSanitizer on the C and C++ order programs | Clean |
| Machine code and assembly | Captured from gcc -O2; Figure 2 is generated from that capture |
Not covered: Windows and MSVC, macOS, ARM processors (the machine code is x86-64 only) and other versions of the compilers and runtimes listed. Bytecode listings in particular change between Java and Python versions.



