What is the difference between the declarative and procedural programming paradigms? Could you please provide some examples?
What other programming paradigms exist?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Imperative
There are several sub-paradigms of the imperative programming paradigm, such as the procedural or the object-oriented programming paradigms.
In the imperative programming paradigm, you describe the algorithm step-by-step, at various degrees of abstraction.
Examples of programming languages which support the procedural paradigm:
Object-Oriented
It typically refers to languages that exhibit a hierarchy of types that inherit both methods and state from base types to derived types, but also includes the unusual prototype-based JavaScript.
Examples of programming languages which support the OO paradigm:
Declarative
There are several sub-paradigms of the declarative programming paradigm, such as the functional or the logic programming paradigms.
In the declarative programming paradigm, you describe a result or a goal, and you get it via a “black box“. The opposite of imperative.
Examples of programming languages which support the declarative programming paradigm:
Functional
Functional programming emphasizes the application of functions without side effects and without mutable state. The declarative systems above exhibit certain aspects of functional programming.
Examples of programming languages which support the declarative functional paradigm: