Programming Paradigms

Programming Paradigms

Most of us might have came across the concept of Programming Paradigms either in our software engineering classes or from work or from the internet. Here in this series of tutorials from us, covering about Programming Paradigms in detail to help your understanding.

What are Programming Paradigms?

Paradigm – ‘a pattern or model of something.

Programming paradigm is the style or design of the program that we code, to solve a problem. So, what does it mean? Each programming language has its own set of concepts. Based on these concepts, a programming language is classified into a programming paradigm.

In other words, as a programmer, if we interact (write code) with the computer by using a programming language, then programming paradigm is like the grammar of that language.

Its all about solving problems. A programming problem that is. To solve a problem, as a developer, choosing a right paradigm is important. While we can have number of approaches to solve a problem, using a right paradigm will help us solve it more efficiently and effectively. Each paradigm supports a set of concepts that makes it the best for certain kinds of problem.

For example,

We should also remember that one paradigm cannot solve all problems. Sometimes we might have to work with multiple paradigms also.

The concept of Multi-paradigm

Most of the mainstream languages support few Paradigms. Let’s take Java for example, it supported Imperative and Object Oriented paradigms until Java 8 got released which brought in some taste of functional paradigm. While mainstream languages like Java supports 1 to few paradigms, there are languages which support multiple paradigms. Take Java script for example. Java script supports dynamic, object-oriented, imperative, and functional styles.

Why should I know about Programming Paradigms?

It is not mandatory for a programmer to know about programming paradigms but it is good to know it. From my experience, understanding programming paradigms will help the programmer to,

  • Choose an appropriate programming language
  • Increase their ability to learn new languages
  • Increasing efficiency in known languages

Choose an appropriate programming language

As mentioned earlier, each paradigm is designed to solve a particular problem. To know which paradigm to choose, a programmer should know about the programming paradigms. It helps him/her to understand the problem and apply an efficient solution by choosing appropriate programming paradigms and languages.

Increase their ability to learn new languages

I have seen my friends and juniors struggle when they start to learn a new language. Most of them were Java developers. When they tried to learn JavaScript, they compared the constructs of JavaScript with that of Java and tried to write JavaScript codes in Java style. Later, I explained them about programming paradigms and passed down what my mentor taught me. It was a lot easier for them to learn a new language after they understood this basic pillar behind it.

Increasing efficiency in known languages

Understanding programming paradigms, will give you more understanding on the languages you already know. Back in my newbie days, I used to work with Java and JavaScript with no understanding of programming paradigms. In fact, I never understood them for 3 years. What I understood was that both the languages are different and they have different styles/rules that should be followed but I never understood what was it and why was it that way. Then one day, one of my mentors gave me brief introduction to programming paradigms. I started to learn more about it and then came to an understanding about the differences.

Types of programming paradigm

While there are many types of programming paradigm, I’m going to discuss only the below few commonly used programming paradigms,

I might add few more paradigms in the future.


I hope this post was helpful 😊. If you find this post informative, support us by sharing this with fellow programmers in your circle 😀.

For any suggestions, improvements, reviews or if you like us to cover a specific topic, please leave a comment.
Follow us on twitter @thegeeksclan and in Facebook.
#TheGeeksClan #DevCommunity

2 thoughts on “Programming Paradigms”

  1. Pingback: Stateful and stateless programs - The Geeks Clan

  2. Pingback: Functions and Methods [explained] - The Geeks Clan

Comments are closed.

error

Enjoy this blog? Please spread the word :)