Professional Documents
Culture Documents
PROGRAMMING PARADIGMS
Prepared by:
Shko Maghded Omar Xalid
Supervised by: Salam Ahmed
INTRODUCTION………………………………………………………
…………………….……….1
IMPERATIVE
PROGRAMMING………………………………………………………
…….….2
Procedural
Programming………………………………………………………
………2
Object Oriented
Programming………………………………………………………3
DECLARATIVE
PROGRAMMING……………………………………………….….
………….4
Functional
Programming…………………………………………………….
…………4
Logic
Programming………………………………………………………
….....………..5
REFERENCES………………………………………..
………………………………………6
INTRODUCTION
1
IMPERATIVE PROGRAMMING
Procedural Programming
Procedural programming (PP) is a programming paradigm, derived from
Imperative Programming, it can be defined like this, based upon the concept of
calling procedure. Procedures, which are also known as routines or functions,
simply consist of a series of computational steps to be carried out. During a
program’s execution, any given procedure might be called at any point, including
by other procedures or itself. Fundamentally, the procedural code is the one that
directly instructs a device on how to finish a task in logical steps. This paradigm
uses a linear top-down approach and treats data and procedures as two different
entities. Based on the concept of a procedure call,
Procedural Programming divides the program into
procedures, simply containing a series of steps to
be carried out. Or Simply put, Procedural
Programming involves writing down a list of
instructions to tell the computer what it should do
step-by-step to finish the task at hand.
C
Object-Oriented Programming
C++
Java
ColdFusion
Pascal
Python
Ruby
Java
Java Script
PHP
C++
Smalltalk
DECLARATIVE
Object-Oriented Programming PROGRAMMING
Prcedural-Oriented Programing
Adding new data and function Adding new data and function is
is easy. not easy.
It’s based on real world. It’s based on unreal world a simple Bank Account App in OOP
3
Imperative programming is a paradigm of computer programming where programs
describe their desired results without explicitly listing commands or steps that must
be performed.
Functional programming
Functional programming (FP) is a programming paradigm, derived from
Declarative Programming, has its roots in mathematics and it is language
independent. The key principle of this paradigm is the execution of a series of
mathematical functions. You compose your program of short functions. All code is
within a function. All variables are scoped to the function. In the functional
programming paradigm, the functions do not modify any values outside the scope
of that function and the functions themselves are not affected by any values outside
their scope. Or in simpler words Functional programming is the process of building
software by composing pure functions, avoiding shared state, mutable data, and
side-effects. Functional programming is declarative rather than imperative, and
application state flows through pure functions. The opposite with object-oriented
programming, where application state is usually shared and collocated with
methods in objects. Functional code tends to be more concise, more predictable,
and easier to test
OCaml
Logic Programming
Scala
Logic Programming (LP) is a programming paradigm, derived from Declarative
Clojure
Programming which is largely based on formal logic, isn't made up of instructions
- rather
Racketit's made up of facts and clauses. It uses everything it knows and tries to
JavaScript
4
come up with the world where all of those facts and clauses are true. To give you
an idea, Ali is Mohamed’s and Ahmed's father. Laila is Mohamed's and Ahmed's
mother. Now, if someone asks a question like "who is the father of Mohamed and
Ahmed?" or "who is the mother of Mohamed and Ahmed?" we can teach the
computer to answer these questions using logic programming:
Functional Logical Programming
Programming
It is totally based on It is totally based on
functions. formal logic.
X = Laila //Output - 1
X = Ali //Output - 2
REFERENCES
Prolog
Absys
1. introduction-of-programming-paradigms
ALF (algebraic logic functional programming language)
Alice
Ciao
5
2. paradigms
3. freecodecamp - what-exactly-is-a-programming-paradigm
4. definition of object-oriented-programming-OOP
5. procedural-programming
6. Logic programming
7. programming-paradigms
8. what-is-functional-programming
The sources were much more than that but that’s all
what i listed here
Did And
you know
if youthat
readweitcurrently have
all and you 700 programming
gained languages?
some info then,
245 of themThank
are notably
You used worldwide