9618 · 20.1
Programming Paradigms
A programming paradigm is a fundamental style or 'way of thinking' about how to build computer programs. Different paradigms provide different structures and concepts for solving problems.
Need to know
What you need to know
- **Low-Level:** Primarily Assembly Language. Code is specific to a particular CPU architecture (e.g., ARM, x86). One-to-one relationship between assembly instructions and machine code instructions.
- **High-Level:** All other paradigms we will discuss (Procedural, OOP, Declarative). Code uses natural language elements, is easier to read and write, and abstracts away the hardware details. One high-level statement translates to many machine code instructions.
Explanation
Ways of Thinking About Code
- First, understand that paradigms are high-level approaches, not specific languages (though languages support certain paradigms).
- Next, distinguish between telling the computer 'how' to do something (Imperative) versus 'what' to achieve (Declarative).
- Within Imperative, learn to spot the difference between a sequence of procedures (Procedural) and interacting objects (Object-Oriented).
- Finally, practice identifying the key features of each paradigm in given code snippets, as this is a common exam task.