HomeCategoriesAll Tags

Programming paradigms

Quickly summarizing some of the programming paradigms

  1. Declarative Declarative programming is a style of building programs that expresses logic of computation without talking about its control flow. The focus is on what needs to be done rather how it should be done.

Declarative Programming is like asking your friend to draw a landscape. You don’t care how they draw it, that’s up to them.

  1. Imperative imperative paradigm forces programmers to write “how” a program will solve a certain task.

Imperative Programming is like your friend listening to Bob Ross tell them how to paint a landscape. While good ole Bob Ross isn’t exactly commanding, he is giving them step by step directions to get the desired result.

  1. Functional Functional programming is a programming paradigm where you model everything as a result of a function that avoids changing state and mutating data. Hence, for a given input, the output will always be the same.

  2. Reactive Reactive programming is the practice of programming with asynchronous data streams or event streams. An event stream can be anything like keyboard inputs, button taps, gestures, GPS location. You can listen to a stream and react to it accordingly.

Examples of procedural programming languages: C, C++, Java, Pascal

Examples of Object Oriented programming languages: Java, Javascript, C++, Objective-C, Visual Basic, .NET, Python, Ruby

Examples of Functional programming languages: Javascript, Haskell, Scala, Erlang, LISP, Clojure

Feel free to share your views or suggest edits

- Ayush 🙂