<aside>
🌎 The fundamental structure and approach of a programming language
</aside>
<aside>
👇 Exam definition
A programming paradigm describes the different types or approaches in programming languages (1 mark) that are needed to solve different problems more effectively (1 mark).
</aside>
Procedural
- Sequential
- Constructs: variable assignment, selection, iteration, procedures etc
- The simplest programming paradigm
- Examples: C, Python etc where most algorithms are written in a linear fashion. However, this may not always be appropriate (i.e. with a GUI), thus a different paradigm may be better suited
- They obey instructions
- Carry out actions/calculations
- Allows the programmer to define precisely each step when performing a task
- Allows tight control over the underlying operation of the hardware
- Used in programs where similar operations may be carried out at varying stages of the program execution
Non-procedural
- Allow programmers to specify the results they want without specifying how to solve the program
- To do with rules/making queries/facts
- Used in database interrogation where retrieving answers are more important than the exact steps required to calculate the result
- Applications: AI, grammar checking, language translation
Visual
- Uses intuitive user interfaces to help build programs rather than relying solely on text