answersLogoWhite

0

AllQ&AStudy Guides
Best answer

Declarative programming focuses on describing the desired results without specifying how to achieve them, while imperative programming involves providing specific step-by-step instructions on how to achieve a result. Declarative programming is more concerned with what needs to be done, while imperative programming is more concerned with how it should be done.

This answer is:
Related answers

Declarative programming focuses on describing the desired results without specifying how to achieve them, while imperative programming involves providing specific step-by-step instructions on how to achieve a result. Declarative programming is more concerned with what needs to be done, while imperative programming is more concerned with how it should be done.

View page

Imperative is how the computer should do something.

Declarative is what you would like the computer to do.

View page

No, declarative and imperative are not the same. Declarative programming focuses on describing what you want to achieve without specifying the exact steps to reach that goal, while imperative programming involves detailing the exact steps and actions to accomplish a task.

View page

Object-oriented programming is a category of programming languages. On a larger scale, OOP would belong under the imperative programming paradigm.

View page

These are all programming paradigms; they describe the "style" used to build the structure and elements of a computer program.

Imperative programming is typically contrasted with declarative programming because they are mutually-exclusive (you won't find any programming languages that are both imperative and declarative), in the same way that you won't find any languages that have both a structured paradigm and a non-structured paradigm. The main difference between the two is that imperative programming describes how a result is to be achieved without specifying what is to be achieved, whereas declarative programming describes what is to be achieved without specifying how it is to be achieved.

Another key difference is that imperative programming makes extensive use of changing-state and mutable data whereas declarative programming does not. Put simply, there are no assignment operations or side-effects in declarative programming.

Given that the object-oriented programming (OOP) paradigm is based upon objects with member methods that can mutate the object's attributes, OOP is based upon the imperative paradigm.

The functional programming paradigm is not to be confused with function calls which are based upon the procedural programming paradigm, which is itself based upon the structured programming paradigm, both of which are imperative. By "functional" we really mean mathematical functions, which are declarative. Although there are some imperative languages that do allow a type of functional programming style, at best they are a grey area because of the side-effects.

Logical programming is also declarative and is based on relations.

View page
Featured study guide

What is a mood

How many moods are there in modern English

What is the indicative mood

What is the indicative mood used for

➡️
See all cards
3.67
3 Reviews
More study guides
5.0
1 Review

No Reviews
Search results