Skip to content

9618 · 20.1

Programming Paradigms — FAQ

Frequently asked questions for 9618 Programming Paradigms. Direct answers first, then deeper explanation — then practise with marking.

Can a programming language support more than one paradigm?

Yes, absolutely. Many modern languages are multi-paradigm. Python, for example, is fundamentally object-oriented but fully supports writing in a procedural style. It also has features that enable a functional programming approach. This flexibility allows programmers to choose the best paradigm for a specific task.

Is 'Imperative' a paradigm I can write as an answer in the exam?

While technically correct, it's better to be more specific. 'Imperative' is a broad category. If the code uses functions and global variables, write 'Procedural'. If it uses classes, objects, and inheritance, write 'Object-Oriented'. Being specific shows a deeper understanding and is more likely to earn full marks.

Why is SQL considered declarative?

Consider the query SELECTNameFROMCustomersWHERECountry=UK;SELECT Name FROM Customers WHERE Country = 'UK';. You are declaring what you want: the names of customers from the UK. You are not specifying how the database should do this. You aren't writing a loop to go through each customer, check their country, and add their name to a list. The database engine handles the 'how' (the execution plan), which is the essence of declarative programming.

Do I need to learn how to code in a declarative language like Prolog for the exam?

No, you are not required to write code in a declarative language for the 9618 syllabus. You only need to understand what the declarative paradigm is, be able to describe its characteristics, and potentially identify it from a description or a very simple example (like an SQL query).