J.H.
CERILLES STATE COLLEGE – DUMINGAG CAMPUS
Dumingag, Zamboanga del Sur
IT 206–Integrative Programming and Technologies 2
LESSON 1: Programming Paradigm
At the end of this Lesson, you will be able to:
Identify the types of paradigm
Review any program and determine the paradigm used
A programming paradigm is a style, or “way,” of programming.
Some languages make it easy to write in some paradigms but not others.
Never use the phrase “programming language paradigm.”
A paradigm is a way of doing something (like programming), not a
concrete thing (like a language). Now, it’s true that if a
programming language L happens to make a particular programming
paradigm P easy to express, then we often say “L is a P language”
(e.g. “Haskell is a functional programming language”) but that does
not mean there is any such thing as a “functional language
paradigm”.
Types of Programming Paradigms
The programing paradigms are categorized in multiple categories yet
most significant are only two:
1. Imperative programming paradigm
2. Declarative programming paradigm
1. Imperative programming paradigm
The imperative programming paradigm is the oldest paradigm and
follows the most basic idea of programming. The programs in these
paradigms are executed step by step by changing the current state
of the program.
An imperative program consists of some command that computer
operates and change the state of the program.
Imperative programming mainly focuses on how a program operates,
unlike declarative programming which focuses on what the result
of the program is going to achieve.
Control flow in imperative programming is explicit: commands
show how the computation takes place, step by step. Each step
affects the global state of the computation.
The imperative is broadly divided into 3 subcategories:
1. Procedural programming paradigm
IT 206–Integrative Programming and Technologies 2
Engr. Oscar Ian S. Lachica
It is the same as imperative programming but with a procedure
call that lets you reuse the code. And this feature was an
amazing advancement at that time. Example C, C++, Java, etc.
2. Object Oriented Programming (OOP)
This is used to work on real-world entities in form of class and
objects. Class is the blueprint of the object and you can
replicate as many as the object you want. These classes
contain some properties and method which all are replicated in
objects. Example C++, Python, etc.
3. Parallel processing
In this type of programming, a program is processed by dividing
it into multiple processors. The system contains multiple
processors to solve the problem in less time.
2. Declarative programming paradigm
A declarative programming paradigm are those paradigms in which the
programmer describes the property of the result without focusing
on how to achieve it (imperative programming focuses on how to
achieve the task by changing the state of the program).
The approach of this programming is to create some object or
elements within the program.
The main focus in this kind of programming is what is to be done
rather than how it should be done.
It does not talk about the work process of the result and only
describes what the program must accomplish.
Declarative programming is used in programming languages used in
a database query, regular expression, functional
programming, logical programming, etc.
A. Logic programming paradigm
Logic programming uses sentences in logical form and creates
an expression by using symbols.
In machine learning and artificial intelligence, there are
many models that use these programs..
The programs are executed very much like some mathematical
statement. It is mainly based on forming logic.
B. Functional programming paradigm
Functional programming is the programming in which a program
is constructed by creating and using functions.
Rather than a series of statements functional programming
use function to map and change one value to another value.
Functional programming is the key feature of JavaScript.
C. Database programming approach
This programming is based on enquiring data, its
modification, its movement, etc. The most famous programming
language that supports this is SQL.
IT 206–Integrative Programming and Technologies 2
Engr. Oscar Ian S. Lachica