Imperative Programmingvs Declarative
Imperative Programmingvs Declarative
paradigm that describes how the program executes. Developers are more
concerned with how to get an answer step by step. It comprises the sequence
of command imperatives. In this, the order of execution is very important and
uses both mutable and immutable data. Fortran, Java, C, C++ programming
languages are examples of imperative programming.
Declarative Programming as the name suggests is a type of programming
paradigm that describes what programs to be executed. Developers are more
concerned with the answer that is received. It declares what kind of results we
want and leave programming language aside focusing on simply figuring out
how to produce them. In simple words, it mainly focuses on end result. It
expresses the logic of computation. Miranda, Erlang, Haskell, Prolog are a few
popular examples of declarative programming.
After getting the basics of understanding of both the languages now let us do
discuss the key differences between these two different types of programming
Imperative Programming
Declarative Programming
Its advantages include ease to learn Its advantages include effective code,
and read, the notional model is which can be applied by using ways, easy
simple to understand, etc. extension, high level of abstraction, etc.