Professional Documents
Culture Documents
programming languages:
From Start to the Present
1
Overview
Prehistory of programming languages
The story of the programmers of Babylon
The story of Mohammed Al-Khorezmi
The story of Augusta Ada, Countess of Lovelace
Generation of programming languages
Genesis of high-level languages
Third Generation
Fourth Generation
Fifth Generation
Babylon
Cuneiform writing was used in the Babylon, founded
by Hammurabi around 1790 BC
Many Babylonian clay tablets survive:
poems and stories
contracts and records
astronomy
math, base 60
1 × 601 + 10 × 600 = 70
1,10 = 1 × 600 + 10 × 60 −1 = 1 1 6
1 × 60i +1 + 10 × 60i
4
A Babylonian Program
Written language to describe computational
procedures:
A cistern.
The length equals the height.
A certain volume of dirt has been excavated.
The cross-sectional area plus this volume comes to 1,10.
The length is 30. What is the width?
You should multiply the length, 30, by …
5
Programming Language
No variables
Instead, numbers serve as a running example of
the procedure being described
“This is the procedure”
Programming is among the earliest uses to which
written language was put
6
Prehistory of programming languages
7
Baghdad
Near ancient Babylon
Founded around 762
A great center of scholarship, art and poetry
780-850: Mohammed Al-Khorezmi, a court
mathematician, lived and wrote
Two little books…
8
Algebra
Kitâ al-jabr wa'l-muqabâla
Translated into Latin, spread throughout Europe
Used as a mathematics text in Europe for eight
hundred years
9
Algorithms
The original is lost
Latin translation: Algorthmi de numero Indorum
Algorithms for computing with Hindu numerals:
base-10 positional system with 0
A new technology (data structure and algorithms)
Strongly influenced medieval European
mathematics
10
Other Early Written Algorithms
Euclid, 300 BC: an algorithm for computing the GCD
of two numbers
Alexander de Villa Dei, 1220 AD: Canto de Algorismo,
algorithms in Latin verse
Not programming languages: natural language (even
poetry) plus mathematics
11
Prehistory of programming languages
12
Augusta Ada
Daughter of George Gordon, Lord Byron
Early 1800’s in England (as elsewhere) women were
generally denied education, especially math and
science
Ada studied math with a private tutor (as an antidote
to feared Byronic tendencies)
Married at 19 (Lady Lovelace), 3 children
13
Charles Babbage
English mathematician
Inventor of mechanical computers:
Difference Engine, construction started but not
completed (until a 1991 reconstruction)
Analytical Engine, never built
14
Analytical Engine
Processing unit (the Mill)
Memory (the Store)
Programmable (punched cards)
Iteration, conditional branching, pipelining, many
I/O devices
15
Sketch of the Analytical Engine
A paper by Luigi Menabrea
Published 1843
Translated, with explanatory notes, by A.A.L.
Algorithms in a real programming language: the
machine language of punched cards for the Analytical
Engine
16
Not Just For Numbers
The bounds of arithmetic were however outstepped the moment the idea
of applying the cards had occurred; and the Analytical Engine does not
occupy common ground with mere "calculating machines." … In enabling
mechanism to combine together general symbols in successions of
unlimited variety and extent, a uniting link is established between the
operations of matter and the abstract mental processes of the most
abstract branch of mathematical science.
A.A.L.
17
Why look at the history?
• To understand PL evolution which adds to a
persons understanding to PL.
18
Genesis of high-level languages
In the early days computers were programmed directly
in hardwires.
Sometimes the instructions were written directly as
numbers (machine language).
Fifth-generation languages
- Provides a visual graphical interface for creating the source
code
21
Early high-level languages
The most famous early imperative high-level languages
are FORTRAN, COBOL and ALGOL 60.
FORTRAN
COBOL
ALGOL 60
22
A different view of the world
• Other early languages pioneered non-imperative
paradigms.
• Lisp emerged in the 1960s as a pure functional
language although it absorbed some imperative
features as time went on.
• APL is also functional in nature. Its strength is
very high-level operations that use matrices.
• SNOBOL was an early language designed for
manipulating strings.
23
Advances in high-level languages
• The 1970s brought many new languages, building
on experiences with the early ones.
24
Non-imperative paradigms
• Smalltalk is the most famous object-oriented
language. It took some of the concepts of Simula.
25
Modern languages
• C is arguably the most widely used imperative
language today.
• Various languages have branched away from C by
adding object-oriented features. The most obvious
are C++, Java and C#.
• Delphi is an object-oriented descendant of Pascal.
• Modern functional languages like ML and Haskell
have built on the concepts pioneered in Lisp. In many
ways they are also declarative.
26
Scripting languages
These languages are designed for rapid application
development and deployment, but are not really suitable
for large programs due to inefficiency and lack of safety
features such as strong typing.
Widely used scripting languages are Perl, Python and Tcl.
27
FORTRAN (1954-1957)
IBM “FORmula TRANslating system” for IBM 704
computer
Major emphasis on compiler producing efficient code
Became the major scientific/engineering
programming language
Much evolution: FORTRAN II, FORTRAN IV,
FORTRAN 66, FORTRAN77, FORTRAN90
28
Overview of FORTRAN IV
Column 1 used to indicate comment lines
Column 2-5 used for line numbers (optional)
Data: integer, real, arrays (no chars, records or
pointers!)
Variable declararions are optional (variables starting
with I..N are integer, others are real
29
Overview of FORTRAN IV…
30
COBOL (1959-1960)
• Common Business-Oriented Language
• Developed in 1959 by a group of computer
professionals called the Conference on Data
Systems Languages (CODASYL).
• COBOL was the first programming language whose
use was mandated by the US Department of
Defense
31
COBOL…
English – like verbose syntax (Goal: Human readability)
Think again..
Object-oriented COBOL is a subset of COBOL 97, which
is the fourth edition in the continuing evolution of
ANSI/ISO standard COBOL
33
ALGOL 60 (1958-1960)
34
ALGOL60…
Introduced recursion, call-by-name and call-by-value
Required stack-based runtime environment
Huge influence on later languages: Pascal, C, Module-
2, Ada etc
36
LISP (1956-1962)
• The first functional language
• The first language to include garbage collection
• Syntax was radically different – lots of parentheses
• Efficiency not a huge concern. Ideas more
important
• Still heavily used today for AI research and
applications
37
Reverse a list
39
Another Example
1960’s
PL/1 (1963-1966)
Intended as an extension of FORTRAN
“The language to end all languages”
A huge language containing many features, with
complex interactions and many special cases and
exceptions
Compilers were huge, slow and unreliable
41
1960’s..
Simula (1963-1966)
• The first object-oriented language
• An extension of ALGOL60, intended for writing simulations
• Introduced classes and inheritance
ALGOL68
• A highly general, orthogonal language with no restrictions
• Complex to implement
42
BASIC (1964)
Intended as a simple language for interactive use
Easy to implement, even on small machines
Widely used on PC’s but many different versions
The term “spaghetti code” commonly used to
describe code written in BASIC
45
1970’s
PASCAL (1972)
• Small simple ALGOL-based language for
teaching
• Elegant data structuring: records, arrays, files,
sets
• Slogan: Algorithms + Data Structures =
Programs
• Became the most taught language in universities
46
1970’s
• C (1972)
• Low-level language for writing an operating system
• Very popular, but why?
47
1970’s
• Prolog (1972-1980)
– The first logic language
– Efficient compilers only available in late 1980s and
1990s
• Smalltalk (1972-1980)
– The first pure object-oriented language
– Included a powerful interactive development, with
windowing system, menus and mouse.
48
1980’s Consolidation and Declarative
Languages
Several new functional languages
Much research on variants of logic programming
Implementation of functional/logic languages
improves
Renewed interest in object-orientation (esp. 1986
onwards
49
1980’s…
Ada (1980-1983)
Large and complex Pascal-like language by US
department of Defense
Strengths include: machine-independent arithmetic,
generic packages, concurrency and exceptions
Ada95 adds object-orientation
50
1980’s…
Modula-2
An improved Pascal with good abstraction features
Became a popular teaching language at universities
51
1980’s…
C++ (1980-1990)
C extended with object-orientation
A comprise language to enable C compatibility
Currently, the most widely used object-oriented
language
52
1980’s…
Eiffel
A clean powerful object-oriented language, somewhat
Ada-like
Includes some powerful program correctness facilities
(pre/post-conditions, class invariants)
53
1990’s
JAVA
Object-oriented language that produces applets.
Developed by Sun Microsystems.
Runs on multiple (all?) platforms.
Developed for use on the Internet.
54
1990’s
PERL (1990)
Practical Extraction and Reporting Language
Pathologically Eclectic Rubbish Lister
Scripting language
“Duct tape of the internet”
55
1990’s..
PHP (1994-1995)
Perl cgi program called “Personal Homepage Tools”
Used to create dynamic web pages
Nowadays also known as “PHP: Hypertext Pre-
processor.”
56
1990’s…
Visual Basic
• Proprietary language owned by Microsoft
• Good for creating quick and simple interface to
other Microsoft products
57
End
58