Comp Prog 2 - Lesson 1
Comp Prog 2 - Lesson 1
Amen.
Good Morning!
01
02
03
04
05
06
02 Attendance
LESSON OUTCOME
Identify and differentiate
01 the generations through
which programming 01
languages have evolved.
02
Identify and differentiate 03
the paradigms or models
02 that programming 04
languages are categorized
05
in.
06
02
Evolution of Programming
Languages
Evolution of Programming Languages
05
06
03
Programming
Paradigms
IMPERATIVE
PROGRAMMING
IMPERATIVE PROGRAMMING
Imperative programming is the oldest and most
traditional model of computing. In a regular, non- 01
programming context, the word "imperative"
02
refers to a mood expressing an essential order or
command. Here, it describes computation in terms 03
06
IMPERATIVE PROGRAMMING
Imperative languages evolved from machine and
assembly languages, whose characteristics reflect 01
the principles of the von Neumann architecture.
02
The program consists of explicit commands or
instructions to be executed, performing operations 03
06
IMPERATIVE PROGRAMMING
06
IMPERATIVE PROGRAMMING
06
FUNCTIONAL
PROGRAMMING
FUNCTIONAL PROGRAMMING
Functional programming is an expression-oriented
programming paradigm. Computations are specified
01
through mathematical functions that evaluate input
expressions and convert them into output values. The 02
06
FUNCTIONAL PROGRAMMING
05
06
FUNCTIONAL PROGRAMMING
Functional programming languages are "what"-
oriented. They describe the problem to be solved
01
rather than specify the actual steps required for the
solution (imperative programming). 02
03
NOTE: Some Functional Programming languages
04
are in prefix notation which means that the
operation is at the beginning of the statement. 05
06
FUNCTIONAL PROGRAMMING
Example in Scheme:
The following statement
+91 01
results to 02
10 03
04
Examples of functional programming languages include
Lisp, Scheme, FP, Standard ML, and Haskell. 05
06
LOGIC
PROGRAMMING
LOGIC PROGRAMMING
In the logical paradigm, programs are written as
logical statements that describe the properties the
solution must have. The program is viewed as a 01
logical theory and computation is basically the
02
search for proof. It may also be stated that logic
programming is based on the concept of logical 03
06
OBJECT-ORIENTED
PROGRAMMING
OBJECT-ORIENTED PROGRAMMING
06
OBJECT-ORIENTED PROGRAMMING
We could also look at the object-oriented paradigm as
an attempt to model a real-world system. A software
system is thus modeled as a set of real-world objects
that interact with each other. An object-oriented 01
program is the specification of a set of objects: their
02
attributes and the way they interact with each other.
Computation then refers to the transformation of the 03
state of these objects. 04
05
Examples of object-oriented programming languages
include Smalltalk, Simula, Java, and C++. 06
CONCURRENT PROGRAMMING
CONCURRENT PROGRAMMING
06
CONCURRENT PROGRAMMING
03
Most commercial languages have concurrent capabilities
04
(Parallel Pascal, Java, Concurrent ML, etc.), but they offer
only a limited implementation of the full potential of the 05
•Imperative Programming
•Functional Programming
•Logic Programming
•Object-Oriented Programming
•Concurrent Programming