Imperative vs. Declarative Programming (procedural, functional, and OOP)

Zach Gollwitzer
8 min readJan 11, 2020

Why You Should Care About this Question

Maybe you heard it in an Object-Oriented Programming book. Maybe you read it on Stack Overflow. Maybe you’re reading a textbook for school.

Eventually, you get annoyed reading the terms “declarative” and “imperative” because you know they are important but have no clue why. In my mind, knowing the difference between imperative and declarative programming is useful for a single reason, and that is to help you better understand the difference between procedural, functional, and object-oriented programming styles. By understanding these five terms, you will be able to read through code and recognize patterns much more quickly.

The Terms

  1. Imperative Programming
  2. Declarative Programming
  3. Procedural Programming
  4. Object-Oriented Programming
  5. Functional Programming

All five of these terms are considered “programming paradigms”, although Imperative and Declarative paradigms are parent hierarchies to procedural, object-oriented, and functional programming.

The diagram above doesn’t make sense yet; especially because Object-Oriented…

--

--