Quickly summarizing some of the programming paradigms
- 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.
- 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.
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.
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:
Examples of Functional programming languages:
Feel free to share your views or suggest edits
- Ayush 🙂