You are on page 1of 17

| |




 

Lecture 1 : Introduction To Programming Paradigms

SEMESTER JAN ² APR 09 1



  | | 
 




1. Increase the ability to express ideas


2. Improve background for choosing
the appropriate languages
3. Increase the ability to learn new
languages
4. Better understanding on the
significance of software
implementation
5. Overall advancement of computing

SEMESTER JAN ² APR 09 2


H  




Ä   
1200 The Abacus
1642 The Pascaline Automatic Calculator
Î to complicated to be operated
Early 1800s Jacquard Loom
Î translated card patterns into cloth designs
1792 - 1872 Charles Babbage
Î The Difference Engine (1823)
Î powered by steam
Î designed to aid the calculation of mathematical,
celestial & navigational table
Î The Analytical Engine (1833)
Î has CPU, software instructions, memory storage &
printed output
Î never actually produced

SEMESTER JAN ² APR 09 3


H  





The Abacus

The Pascaline
Automatic
Calculator

The Difference
Jacquard Loom Engine
SEMESTER JAN ² APR 09 4
H  




Ä   
1842 Ada Augusta Bryon
Î the first computer programmer
Î innovations
1. subroutine
2. looping
1937 The Universal Machine
Î Alan Turing
1940s Î The ENIAC (1942)
Î The Von Neumann Concepts
1. shared-program techniques
2. conditional control transfer
Î Konrad Zuse & Plankalkul
Î first algorithmic programming language
Î defined circa 1945 but never implemented
Î Plankalkul
Î algorithms in the language include a program to play chess
Î finally published in 1976
Î include some advanced data types such as floating point, arrays &
records

SEMESTER JAN ² APR 09 5


H   



 
@
   
Ä 
Pseudocodes Î the first high level programming language
(1949) 1. Short Code : John Mauchly (1949)
Î expression were coded left to right
Î hand compiled
2. Speed Coding : John Backus (1953 / 54)
Î conditional & unconditional branching
Î interpreter left only 700 words for user program
3. Laning & Zieler System (1953)
Î subscripted variables, function calls & expression
translation
FORTRAN Î FORmula TRANslator
(1954 - 57) Î developed at IBM under the guidance of John Backus
Î primarily for scientific, computational programming
Î dramatically changed forever the ways computers are used
Î has continued to evolved
Î among the most efficient compilers for producing Fastcode

SEMESTER JAN ² APR 09 6


H   



 
@
   
Ä 
COBOL Î Common Business Oriented Language
(1959) Î the first business oriented language
Î based on FLOW-MATIC
Î names up to 12 characters, with embedded
hyphens
Î English names for arithmetic operators
Î data & code were completely separated
Î contributions:
1. first micro facility in a high level language
2. hierarchical data structures (records)
3. nested selection statements
4. long names (up to 30 characters) with
hyphens
5. data division
SEMESTER JAN ² APR 09 7
H   



 
@
   
Ä 
LISP Î List Processing language
(1959) Î designed at MIT by John McCarthy
Î AI research needed a language that:
1. process data in lists
2. symbolic computation
Î one universal recursive data type : s-expression
Î syntax is based on Lambda Calculus
Î pioneered functional programming
Î no need for variables or assignment
Î control via recursion & conditional expressions
Î programs-as-data
Î garbage collection
Algol 58 Î semicolon as a statement separator
Î assignment operator was :=
Î if had an else if clause
Î compound statement (begin .. end)
Î concept of type formalized
Î names could be of any length
Î arrays could have any number of subscripts
Î parameters were separated by mode (in & out)

SEMESTER JAN ² APR 09 8


H   



 
@
   
Ä 
Algol 60 Î block structure (local scope)
Î 2 parameter passing methods
Î subprogram recursion
Î stack dynamic arrays
Î no I/O & no string handling
Î successes:
1. standard way to publish algorithms for
over 20 years
2. all subsequent imperative languages are
based on it
3. first machine independent language
4. first language with formally defined syntax
(BNF)
5. never widely used
SEMESTER JAN ² APR 09 9

    



 
@
   
Ä 
PL / I Î good for scientific & business applications
(1963 / 64) Î eventually grew to include virtually idea in current practical
programming languages
Î translator were slow, huge & unreliable
Î contributions:
1. first unit level concurrency
2. first exception handling
3. switch selectable recursion
4. first pointer data type
BASIC Î Beginner·s All purpose Symbolic Instruction Code
(1964) Î designed by Kemeny & Kurtz at Dartmouth
Î goals:
1. easy to learn & use for non science students & as a path to
FORTRAN and Algol
2. pleasant & friendly
3. fast turnaround for homework
4. free & private access
5. user time is more important than computer time
6. well suited for implementation on first PCs

SEMESTER JAN ² APR 09 10


 | 
 
|  

@
   
Ä 
C Î aim for simplicity by reducing restrictions of the type system
Î allows access to underlying system
Î interface with OS - UNIX
Pascal Î designed by Niklaus Wirth
Î designed for teaching structured programming
Î small & simple
Î introduces some modest improvements, such as the case
statement
Î was widely used for teaching programming (1980 - 1995)
C Î designed for systems programming at Bell Labs by Dennis Richie
(1972) & colleagues
Î powerful set of operators, but poor type checking
Î initially spread through UNIX & the availability of high quality,
free compilers
Î memory model is close to underlying hardware
Î flexible

SEMESTER JAN ² APR 09 11


 | 
 
|  

@
   
Ä 
Modula-2 Î developed by Niklaus Wirth at ETH
(mid 1970s) Î Pascal plus modules & some low level features
designed for systems programming
Modula-3 Î developed at Digital & Olivetti
(late 1980s) Î Modula-2 plus classes, exception handling, garbage
collection & concurrency
Oberon Î developed by Wirth at ETH
(late 1980s) Î adds support for OOP to Modula-2
Î many Modula-2 features were deleted

SEMESTER JAN ² APR 09 12


|  
   


  
@
   
Ä 
Ada Î primarily known as DoD-1
(1979) Î contributions:
1. packages ² support for data abstraction
2. exception handling
3. generic program units
4. concurrency
Logic Î based on formal logic
Programming Î operational basis: solving queries relative to theory represented by
program
Î1972: PROLOG (PROgramming in LOGic)
Î unification
Î goal seeking with backtracking
Functional Î Common Lisp : consolidation of LISP dialects spurred practical use
Programming Î Scheme : a simple & pure LISP like language used for teaching
programming
Î Logo : used for teaching young children how to program
Î Haskell : polymorphicaly typed, lazy, purely functional language

SEMESTER JAN ² APR 09 13


|  
   


  
@
   
Ä 
ML Î Meta Language
Î strongly typed functional language
Î first developed by Robin Miller
Î intended for interactive use
Î combination of LISP & Algol like features:
1. expression oriented
2. higher order functions
3. garbage collection
4. abstract data types
5. module system
6. exceptions
Simula 67 Î first OO language
Î designated for simulation
Î later recognized as general purpose programming language
Î extension of Algol 60
Î standardized as Simula in 1977
Î inspiration to many later designers

SEMESTER JAN ² APR 09 14


|  
   


  
@
   
Ä 
Smalltalk Î major language that popularized objects
(1972 - 80) Î developed at Xerox PARC 1970·s
Î object metaphor extended & refined
Î used some ideas from Simula, but very different
language
Î everything is an object, even a class
Î all operations are ´message to objectsµ
Î very flexible & powerful language
Î method dictionary & lookup procedure
Î run time search; no static type system
Î independent subtyping & inheritance
C++ Î developed at Bell Labs by Stroustrup
(1985) Î facilities for OOP added to C
Î better static type checking
Î backwards compatible with C
Î efficiency of compiled code

SEMESTER JAN ² APR 09 15


H  

@
   
Ä 
Perl Î Practical Extraction and Reporting Language
(1987) Î interpreted scripting language
Î original application : system administration & data
reduction
Î data manipulation
Î rapid application development
Î block structured, also supports OO
Î associative arrays instead of records or structures
Java Î developed by James Gosling & others at Sun
(early 1990s) Microsystems
Î original goal : a language for embedded computers
Î original name : Oak
Î started as reimplementation of C++
Î has references, no pointers
Î includes support for Applets & concurrency
SEMESTER JAN ² APR 09 16
 


›    ›
 
FORTRAN Scientific applications
COBOL Business applications
LISP, Prolog Artificial intelligence
PL/S, BLISS, Extended Algol, C System programming
sh, awk, Perl Scripting languages
LISP, COGO, APT Special purpose languages

SEMESTER JAN ² APR 09 17

You might also like