Declarative Programming

Definition - What does Declarative Programming mean?

Declarative programming is a programming paradigm in which the programmer defines what needs to be accomplished by the program without defining how it needs to be implemented. In other words, the approach focuses on what needs to be achieved instead of instructing how to achieve it. It is different from an imperative program which has the command set to resolve a certain set of problems by describing the steps required to find the solution. Declarative programming describes a particular class of problems with language implementation taking care of finding the solution. The declarative programming approach helps in simplifying the programming behind some parallel processing applications.

Techopedia explains Declarative Programming

Order of expression or statements or the replication of a statement would not have any impact in declarative programming. Declarative programming can be further categorized into constraint programming, logic programming and constraint logic programming. Prolog, SQL and embedded SQL are some of the well-known examples of declarative programming languages. Tools are provided to programmers in declarative programming to allow abstraction of the implementation and to help in the concentration of the issue.

There are many advantages associated with declarative programming. First of all, it minimizes mutability. Immutable data structures help in eliminating hard-to-detect bugs and are easier to handle. Programmers would find it easier to work with such programming approaches rather than ones with unclear procedures, implicit dependencies or with lots of mutable states. Another benefit with declarative programming is it reduces state side effects by favoring the use of complex constructs like higher order functions and pipelines and by discouraging variables. The programming approach also helps in making the code more understandable and more scalable.

Share this:

Connect with us

Email Newsletter

Join thousands of others with our weekly newsletter

The 4th Era of IT Infrastructure: Superconverged Systems
The 4th Era of IT Infrastructure: Superconverged Systems:
Learn the benefits and limitations of the 3 generations of IT infrastructure – siloed, converged and hyperconverged – and discover how the 4th...
Approaches and Benefits of Network Virtualization
Approaches and Benefits of Network Virtualization:
Businesses today aspire to achieve a software-defined datacenter (SDDC) to enhance business agility and reduce operational complexity. However, the...
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.