Back to series
· 10 min read

Programming Language Classification and Future Directions


I. Why Do We Need to Classify Programming Languages?

There are many programming languages, and different languages have obvious differences in syntax, type systems, execution mechanisms, memory management, and application scenarios.

For example:

  • C emphasizes low-level control and execution efficiency.
  • Java emphasizes cross-platform execution and enterprise-level development.
  • Python emphasizes development efficiency and expressiveness.
  • JavaScript targets the Web ecosystem and supports event-driven and asynchronous programming.
  • Rust emphasizes memory safety and system-level performance.
  • Go emphasizes simplicity, concurrent programming, and engineering efficiency.

If you only memorize them by language name, it is difficult to understand the relationships between them.

Classifying programming languages can help build a cognitive system from different perspectives.

Note:

Programming language categories are not mutually exclusive.

A language can belong to multiple categories at the same time. For example, Rust is a statically typed language, a compiled language, and a systems programming language, and it also supports imperative and functional programming styles.


II. Classification by Execution Method

Execution method mainly describes how source code is converted into a form that a computer can execute.

Common categories include compiled languages, interpreted languages, and languages that use a hybrid execution mechanism.

1. Compiled Languages

Compiled languages typically use a compiler to convert source code into target code, which is then executed by the target runtime environment.

Typical languages:

  • C
  • C++
  • Rust
  • Go
  • Swift

For example, in C:

#include <stdio.h>

int main() {
    printf("Hello World\n");
    return 0;
}

The compiler performs lexical analysis, syntax analysis, semantic analysis, optimization, and code generation on the source code, ultimately producing an object file or executable file.

Typical process:

flowchart TD
    A["Source code"] --> B["Lexical analysis"]
    B --> C["Syntax analysis"]
    C --> D["Semantic analysis"]
    D --> E["Intermediate representation and optimization"]
    E --> F["Target code generation"]
    F --> G["Linking"]
    G --> H["Executable program"]
    H --> I["Operating system loads and executes it"]

    style A fill:#E8F1FF,stroke:#3973C6,color:#1D3557
    style B fill:#EAF7EF,stroke:#3A9560,color:#245B3A
    style C fill:#EAF7EF,stroke:#3A9560,color:#245B3A
    style D fill:#EAF7EF,stroke:#3A9560,color:#245B3A
    style E fill:#FFF4DF,stroke:#C58A28,color:#765015
    style F fill:#F1EAFE,stroke:#8055B5,color:#49316D
    style G fill:#F1EAFE,stroke:#8055B5,color:#49316D
    style H fill:#E8F1FF,stroke:#3973C6,color:#1D3557
    style I fill:#EAF7EF,stroke:#3A9560,color:#245B3A

Main characteristics:

  • Many syntax and type errors can be found during compilation.
  • The compiler can perform optimizations for the target platform.
  • It can usually generate a standalone machine-code program.
  • The original source code is not necessarily required at runtime.
  • The generated target program may be tied to a specific operating system or processor architecture.

Note that being a compiled language does not necessarily mean it is faster than an interpreted language. Actual performance also depends on compiler optimization, runtime mechanisms, algorithms, and the program's execution scenario.

2. Interpreted Languages

Interpreted languages typically use an interpreter to read the program and perform the corresponding operations at runtime.

Typical languages or runtime environments include:

  • Python
  • Ruby
  • PHP
  • some JavaScript execution environments

For example:

name = "Reverie"
print(name)

In Python, developers usually run the source code directly:

python main.py

The interpreter handles the program and executes its operations.

Typical process:

flowchart TD
    A["Source code"] --> B["Interpreter"]
    B --> C["Analyze program structure"]
    C --> D["Execute program instructions"]
    D --> E["Produce execution results"]

    style A fill:#E8F1FF,stroke:#3973C6,color:#1D3557
    style B fill:#EAF7EF,stroke:#3A9560,color:#245B3A
    style C fill:#FFF4DF,stroke:#C58A28,color:#765015
    style D fill:#F1EAFE,stroke:#8055B5,color:#49316D
    style E fill:#E8F1FF,stroke:#3973C6,color:#1D3557

Main characteristics:

  • Developers usually do not need to manually generate standalone machine-code programs.
  • The runtime environment can directly process source code or an internal representation.
  • Development and debugging are usually more flexible.
  • Execution may require an interpreter or virtual machine.
  • Performance depends on factors such as interpreter implementation and runtime optimization.

Note that modern implementations of interpreted languages usually do not simply read source code line by line and execute it directly.

For example, CPython usually first compiles Python source code into bytecode, which is then executed by a virtual machine.

Therefore, the difference between interpreted and compiled languages cannot be understood simply as one having a compilation process and the other having no compilation process at all.

3. Hybrid Execution Mechanisms

Modern languages and runtime environments often combine compilation and interpretation techniques.

Typical examples:

  • Java
  • C#
  • JavaScript
  • Some implementations of Python

Take Java as an example:

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}

The Java compiler compiles source code into bytecode, and the JVM then executes the program through interpreted execution and just-in-time compilation (JIT).

flowchart TD
    A["Java source code"] --> B["javac compiler"]
    B --> C["Bytecode Class file"]
    C --> D["JVM runtime"]
    D --> E["Interpreted execution"]
    D --> F["JIT just-in-time compilation"]
    E --> G["Program execution"]
    F --> G

    style A fill:#E8F1FF,stroke:#3973C6,color:#1D3557
    style B fill:#EAF7EF,stroke:#3A9560,color:#245B3A
    style C fill:#FFF4DF,stroke:#C58A28,color:#765015
    style D fill:#F1EAFE,stroke:#8055B5,color:#49316D
    style E fill:#EAF7EF,stroke:#3A9560,color:#245B3A
    style F fill:#EAF7EF,stroke:#3A9560,color:#245B3A
    style G fill:#E8F1FF,stroke:#3973C6,color:#1D3557

During program execution, JIT compiles some hot code into machine code to improve subsequent execution efficiency.

Modern JavaScript runtimes also follow a similar technical approach; for example, V8 combines bytecode, interpreted execution, and optimizing compilation.

Core differences:

Execution method Main mechanism Representative languages
Compiled Compilation produces target code C, C++, Go, Rust
Interpreted Interpret or execute a program representation at runtime Python, Ruby
Hybrid Combines compilation, interpretation, JIT, and other mechanisms Java, C#, JavaScript

This is a common conceptual classification, not a strict division of language properties. The same language can have different implementations.


III. Classification by Type System

A type system describes the types of data in a program and the operations allowed between different types.

It is one of the core mechanisms in programming language design.

1. Statically Typed Languages

Statically typed languages usually perform type checking at compile time.

Typical languages:

  • C
  • C++
  • Java
  • Go
  • Rust
  • TypeScript
  • Swift

For example:

int age = 18;
String name = "Tom";

age = "Hello"; // Type error

The variable age is declared as an integer type and cannot be directly assigned a string.

A static type system can detect many type errors before the program runs.

Main characteristics:

  • Type information is usually checked at compile time.
  • The compiler can use type information for optimization.
  • Constraints on interfaces and data structures are clearer.
  • Static analysis and refactoring are easier in large projects.

However, static typing does not mean that all types must be manually declared.

For example, both Go and Rust support type inference:

name := "Reverie"
age := 18

The compiler can infer variable types from initialization expressions.

2. Dynamically Typed Languages

Dynamically typed languages usually determine or check the types of objects at runtime.

Typical languages:

  • Python
  • JavaScript
  • Ruby
  • PHP

For example:

value = 100
value = "Hello"
value = [1, 2, 3]

The same variable name can refer to objects of different types at different times.

Main characteristics:

  • Type checking usually occurs at runtime.
  • Code can be expressed more flexibly.
  • Some type declarations can be reduced during development.
  • Some type errors may only surface when specific code paths are executed.

Two concepts need to be distinguished in particular:

  • Dynamic typing: Type checking or type binding mainly occurs at runtime.
  • Weak typing: The language has relatively loose rules for type conversion and allows certain implicit conversions.

Dynamic typing is not the same as weak typing, and static typing is not the same as strong typing.

For example, Python is a dynamically typed language but has relatively strict type rules; TypeScript is a statically type-checked language while retaining JavaScript's runtime semantics.

3. Strong Typing and Weak Typing

There is no unified, strict definition of strong typing and weak typing that applies to all languages; these terms are usually used to describe how strictly a language constrains type conversion and type operations.

For example, JavaScript:

console.log("10" + 5);  // "105"
console.log("10" - 5);  // 5

JavaScript performs implicit type conversion in different operation scenarios.

In Python, however:

print("10" + 5)

This produces a type error, as directly adding a string and an integer is not allowed.

This shows that different languages have different design strategies for type conversion.

4. Comparison of Type System Categories

Category Core Characteristics Representative Languages
Static typing Type checking mainly occurs at compile time Java, Go, Rust
Dynamic typing Types are mainly handled at runtime Python, JavaScript
Strong typing tendency Stricter restrictions on operations between incompatible types Python, Rust
Weak typing tendency Some implicit type conversions are relatively permissive JavaScript, C

Note that strong versus weak typing is not a completely unified academic classification standard; in practical analysis, it is best to discuss specific type conversion rules, type safety mechanisms, and runtime behavior.


IV. Classification by Programming Paradigm

A programming paradigm is a way of organizing program logic and describing computational processes.

It determines the primary way programmers think about and organize code.

The same language can usually support multiple programming paradigms.

1. Imperative Programming

Imperative programming emphasizes describing which steps a program should execute and how to change program state.

For example:

numbers = [1, 2, 3, 4, 5]
total = 0

for number in numbers:
    total += number

print(total)

The code explicitly describes:

  • initializing variables;
  • iterating over a collection;
  • accumulating data;
  • outputting the result.

Typical languages:

  • C
  • C++
  • Java
  • Python
  • Go

Imperative programming is the foundation of many traditional software development approaches.

2. Procedural Programming

Procedural programming is a way of organizing imperative programming.

It emphasizes splitting a program into multiple procedures or functions and organizing program logic through function calls.

For example:

#include <stdio.h>

int add(int a, int b) {
    return a + b;
}

int main() {
    int result = add(10, 20);
    printf("%d\n", result);
    return 0;
}

Main characteristics:

  • Code is organized around functions or procedures;
  • Emphasizes execution steps;
  • Data and operations are usually organized separately;
  • Suitable for clear process-oriented tasks.

Representative languages: C, Pascal.

3. Object-Oriented Programming

Object-oriented programming (OOP) emphasizes organizing data and behavior through objects.

Core concepts include:

  • encapsulation;
  • inheritance;
  • polymorphism;
  • abstraction.

For example:

class User {
    private String name;

    public User(String name) {
        this.name = name;
    }

    public void sayHello() {
        System.out.println("Hello, " + name);
    }
}

Objects organize state and behavior together.

Typical languages:

  • Java
  • C++
  • C#
  • Python
  • Ruby
  • Swift

Object-oriented programming is suitable for organizing business systems with complex state, behavior, and relationships, but it does not mean that all problems should be solved through classes and inheritance.

4. Functional Programming

Functional programming emphasizes using function composition to express computational processes and reducing mutable state and side effects as much as possible.

Typical characteristics:

  • Functions are first-class citizens;
  • Higher-order functions;
  • Pure functions;
  • Immutable data;
  • Function composition;
  • Recursion;
  • Declarative expression.

For example, JavaScript:

const numbers = [1, 2, 3, 4, 5];

const result = numbers
    .filter(n => n % 2 === 0)
    .map(n => n * 2);

console.log(result);

This code uses function composition to perform filtering and transformation.

Typical languages:

  • Haskell
  • Lisp
  • Clojure
  • F#
  • Scala

Languages such as Python, JavaScript, Java, and Rust also support functional programming to varying degrees.

5. Logic Programming

Logic programming describes problems through facts and rules, and the program performs inference based on logical relationships at runtime.

Typical language: Prolog.

For example:

parent(tom, bob).
parent(bob, alice).

grandparent(X, Y) :-
    parent(X, Z),
    parent(Z, Y).

This defines parent-child and grandparent-grandchild relationships.

Query:

?- grandparent(tom, alice).

The system can infer the result according to the rules.

Logic programming is commonly used in:

  • Rule inference;
  • Knowledge representation;
  • Expert systems;
  • Symbolic computation;
  • Constraint solving.

6. Declarative Programming

Declarative programming emphasizes describing the desired result rather than specifying in detail how each step should be executed.

For example, SQL:

SELECT name
FROM users
WHERE age >= 18;

Developers describe the query goal, and the database system determines the specific execution plan.

Declarative programming is a relatively broad programming idea; functional programming, logic programming, and SQL all have declarative characteristics.

7. Comparison of Programming Paradigms

Programming paradigm Core idea Representative languages
Imperative Describes execution steps and state changes C, Go
Procedural Organizes programs using functions C, Pascal
Object-oriented Organizes data and behavior using objects Java, C++
Functional Describes computation using function composition Haskell, Lisp
Logic Infers results using facts and rules Prolog
Declarative Describes goals and constraints SQL, Prolog

These paradigms are not completely independent of one another.

For example, Java can use imperative, object-oriented, and functional programming styles at the same time.


V. Classification by Level of Abstraction

The level of abstraction describes how close a programming language is to hardware details.

They can generally be divided into low-level languages and high-level languages.

1. Low-Level Languages

Low-level languages are closer to computer hardware and instruction execution mechanisms.

Typical examples:

  • Machine language;
  • Assembly language.

Main characteristics:

  • Can directly control registers and memory;
  • Are closely related to processor architecture;
  • Their execution is closer to the hardware;
  • Programmers need to understand more low-level details.

Low-level languages are often used in:

  • Operating system internals;
  • Device drivers;
  • Embedded systems;
  • Bootloaders;
  • Performance-sensitive low-level code.

2. High-Level Languages

High-level languages provide richer abstraction capabilities, allowing developers to express program logic using variables, functions, objects, and data structures.

Typical examples:

  • C;
  • C++;
  • Java;
  • Python;
  • Go;
  • Rust.

High-level languages can generally reduce the work programmers must do to directly handle hardware details.

However, high-level languages do not mean that low-level control is impossible.

For example, both C and Rust are high-level programming languages, and both have strong system-level programming capabilities.

3. Abstraction Level Illustration

flowchart TD
    A["Application-level abstraction<br/>Business logic, domain models"]
    B["High-level language abstraction<br/>Variables, functions, objects, generics"]
    C["Low-level programming abstraction<br/>Pointers, memory, system calls"]
    D["Assembly instructions<br/>Registers, addressing modes, instructions"]
    E["Machine instructions<br/>Binary encoding"]
    F["Hardware execution<br/>CPU, memory, devices"]

    A --> B
    B --> C
    C --> D
    D --> E
    E --> F

    style A fill:#EAF7EF,stroke:#3A9560,color:#245B3A
    style B fill:#E8F1FF,stroke:#3973C6,color:#1D3557
    style C fill:#FFF4DF,stroke:#C58A28,color:#765015
    style D fill:#F1EAFE,stroke:#8055B5,color:#49316D
    style E fill:#FCE8E6,stroke:#C96A5B,color:#783C35
    style F fill:#E8F1FF,stroke:#3973C6,color:#1D3557

Note that this diagram expresses relationships between levels of abstraction; it does not mean that every program strictly passes through all levels.


6. Classification by Application Domain

Programming languages can also be classified by their primary application domain.

This classification focuses more on how languages are positioned in practical engineering.

1. Systems Programming Languages

Systems programming languages are mainly used to develop operating systems, compilers, runtimes, drivers, and infrastructure.

Typical languages:

  • C
  • C++
  • Rust
  • Go in some scenarios

Core requirements:

  • Execution efficiency;
  • Memory control capabilities;
  • Hardware interaction capabilities;
  • Concurrency capabilities;
  • Resource management capabilities.

2. Web Development Languages

Web development involves the browser side, the server side, and related infrastructure.

Typical languages:

Area Common Languages
Frontend development JavaScript, TypeScript
Backend development Java, Go, Python, PHP, C#
Full-stack development JavaScript, TypeScript
WebAssembly applications Rust, C, C++

Web development is not accomplished independently by any single language; rather, it is jointly constituted by languages, browsers, servers, protocols, and frameworks.

3. Data Science and Artificial Intelligence Languages

This field focuses on data processing, statistical analysis, machine learning, and model development.

Typical languages:

  • Python;
  • R;
  • Julia;
  • C++.

Among them, Python has a very mature tool ecosystem in the field of artificial intelligence.

Common technical libraries include:

  • NumPy;
  • Pandas;
  • SciPy;
  • PyTorch;
  • TensorFlow;
  • Scikit-learn.

Python is mainly responsible for model development, data processing, and experimental workflows, while low-level high-performance computing often relies on technologies such as C, C++, and CUDA.