What Is Declarative Programming?
Declarative programming is a programming paradigm, as opposed to imperative programming. It describes the nature of the goal and makes the computer understand the goal, not the process. Declarative programming eliminates the need to tell the computer the problem domain, thereby avoiding the side effects that follow. Imperative programming requires algorithms to clearly indicate what to do at each step.
- Declarative programming is often defined as a programming paradigm other than imperative. There are other definitions as well. These definitions are not a simple comparison between declarative programming and imperative programming. For example:
- Declarative programming tells a computer to calculate "what" rather than "how" to do it
- No
- Declarative programming is a big concept, and it contains some well-known subprogramming paradigms.
- (Opposite) imperative programming
- Functional programming and logic programming