Programming Paradigms: An Overview
Hello and Welcome to our Blog Series. All blogs will
be related to Programming with a focus on Object Oriented Programming. This
blog is the first one out of the many blogs which will be coming up over the
course of next few months. A new blog will be uploaded every Monday starting
from today (27th January, 2020). This will be a series of 16 blogs and
throughout the series and we wish to provide interesting content to our
audience. This initiative is a part of the Home Assignments for the course
Object Oriented Programming which I have taken up in this semester.
What is Programming?
Programming is the process of instructing a computer perform a desired task. Like humans speak various languages, the computers can also be instructed using different
languages. Among them the most popular ones are C, C++, Java, Python,
JavaScript, C# to name a few.
Each language has its pros and cons. A language is
selected based on the application, specific use case, compatibility
considerations and user requirements. Programming is a creative task and
depending of the ingenuity of the programmer the computer can be instructed to
perform the same task in a number of ways. These different approaches are
called programming paradigms.
The word ‘Paradigm’
simply means a method to solve a problem or do a task. Each paradigm represents a fundamentally different approach to build a solution.Each programming language follows some strategy when it is implemented and this methodology/strategy is called as paradigm. Just as there are various programming languages, there are various programming paradigms depending on specific problem at hand. The various programming paradigms are procedural programming,
object oriented programming, parallel processing approach, logic programming,
functional programming and database processing approach.
The first three fall
under the Imperative Programming paradigm. It is one of the oldest programming paradigms.
It is based on Von Neumann
architecture and features close relation to machine architecture. The main agenda is how to achieve the desired result. There are multiple statements and after executing all the statements the result is stored for further processing.
The latter three fall under Declarative Programming paradigm. Declarative programming is a style of programming that
expresses logic of computation without talking about its control flow. This approach simplifies parallel programming. Rather than focusing on how the result can be achieved, the main focus here is just on what do we want to achieve. Hence, it is now clear that declarative programming deals with "how to do" while imperative programming deals with "what to do".
We will look at two
of the most important programming paradigms which are the procedural paradigm
and the object-oriented paradigm.
Procedural Oriented Programming (POP)
It follows a top down
approach. It deals with algorithms/procedures and the program is divided into
various functions. Each function performs a specific task. Most of the
functions share global data and data moves from one function to another.
Functions are responsible for transforming or manipulating data from one form
to another. There is no overloading. It requires less memory but it is less
secure as compared to object oriented programming. Popular procedural
programming languages are C, BASIC, Fortran and COBOL to name a few. The most
popularly used language is C.
Object Oriented Programming (OOP)
It follows a bottom up
approach. It deals with data. Here, programs are divided into objects. An object
is a software bundle of data and functions which are used to manipulate or
perform operations on the data. It requires more memory but it is more secure.
Data cannot be accessed by outside functions as it is hidden. Functions that
operate on data are bind to classes. It
follows operator overloading and function overloading. Popular object oriented
programming languages are C++, Java and .NET to name a few. The most popularly
used language is Java.
Object Oriented Programming approach has a
modular structure, allows re-usability of code, ensures easy maintenance of
software and hence enables faster development. All these factors contribute to
improved productivity of the programmer. Hence, object oriented programming is
used for commercial development purposes.
This brings us to the
end of this week’s blog where we discussed various programming paradigms. With
this basic knowledge of various programming paradigms, we are now ready to delve into
other aspects of programming. Hope to see you next week. Thanks a lot for
reading!
Sarvesh Patki
References-
[1] GeeksforGeeks https://www.geeksforgeeks.org/
[2] Wikipedia https://www.wikipedia.org/
References-
[1] GeeksforGeeks https://www.geeksforgeeks.org/
[2] Wikipedia https://www.wikipedia.org/
Quite informative!
ReplyDeleteThank You
DeleteVery good blog for basic understanding of programming.
ReplyDeleteThanks :)
Delete