Skip to main content

Posts

Showing posts with the label The Crazy Programmer Declarative vs Imperative Programming Declarative vs Imperative Programming The Crazy Programmer

Declarative vs Imperative Programming Neeraj Mishra The Crazy Programmer

When we talk about the programming we mainly focus on languages and codes but an important part of writing good code or selecting the correct programming language for the problem we are working on is to understand the language itself. In this article, we will discuss the different types of Programming Paradigm which are present in programming. Let us first understand the meaning of Programming Paradigm, it may sound something difficult but it simply is a division of languages based on how they work. There are mainly 4 types of paradigm:  Imperative or Procedural Programming E.g. C, Pascal etc. Declarative Programming E.g. SQL Logical Programming  E.g. Prolog Object Oriented Programming E.g. Java, C++ etc. Let’s see an example to understand the difference between Imperative and Declarative Programming. Suppose you are trying to build a house, if you go to your engineer and tell him how many rooms you want and where you want them then you will come under a declara