- Classification by "Level" (Abstraction)
- Classification by Paradigm (The "Style")
- Imperative (How to do it)
- Declarative (What to do)
- Classification by Execution Method
- Classification by Type System
Classification by "Level" (Abstraction)
- Low-Level Languages: These are "hardware-centric."
- Machine Code: The actual binary (0s and 1s) the CPU executes.
- Assembly: Uses short mnemonics (like
MOVorADD) to represent machine instructions. It is specific to the processor architecture. - High-Level Languages: These use English-like syntax and are "programmer-centric." They abstract away memory management and hardware details. Examples include Python, Java, and Ruby.
- Mid-Level Languages: Often used to describe languages like C and C++. They provide high-level syntax but allow low-level access to memory via pointers.
Classification by Paradigm (The "Style")
A paradigm is a philosophy of how a program should be structured.
Imperative (How to do it)
The programmer provides a step-by-step list of instructions to change the computer's state.
- Procedural: Based on the concept of "procedure calls" (functions). (e.g., C, Fortran, Pascal)
- Object-Oriented (OOP): Organized around "objects" (data) rather than "actions" (logic). It uses concepts like classes, inheritance, and encapsulation. (e.g., Java, C++, Python, C#)
Declarative (What to do)
The programmer describes the result they want, rather than the explicit steps to get there.
- Functional: Treats computation as the evaluation of mathematical functions and avoids changing state or mutable data. (e.g., Haskell, Lisp, Elixir)
- Logic: Based on formal logic; you state facts and rules. (e.g., Prolog)
- Database/Query: Specifically for interacting with data. (e.g., SQL)
Classification by Execution Method
Type | Description | Examples |
Compiled | The entire source code is translated into machine code by a compiler before execution. | C, C++, Rust, Go |
Interpreted | An interpreter reads and executes the code line-by-line. | Python, Ruby, PHP |
Hybrid (JIT) | Code is compiled into "Bytecode," which is then interpreted or compiled "Just-In-Time" by a Virtual Machine. | Java, C# |
Classification by Type System
This defines how the language handles data types (integers, strings, etc.).
- Static vs. Dynamic:
- Static: Type checking happens at compile-time. You must declare that
xis an integer. (e.g., Java, C++) - Dynamic: Type checking happens at runtime.
xcan be a string now and an integer later. (e.g., Python, JavaScript) - Strong vs. Weak:
- Strong: The language is strict about types. It won't let you add a string to an integer without explicit conversion. (e.g., Python, Java)
- Weak: The language makes guesses. It might let you add
"5" + 2and result in"52"or7. (e.g., JavaScript, C)