Chapter 2:
Evolution of the
Major Programming
Nestor Miguel T. Pimentel
Instructor 1
Insert product photo here
Genealogy of
Common Languages
Zuse’s Plankalkül
Designed in 1945, but not published until 1972
Never implemented
Advanced data structures
floating point, arrays, records
By early 1945, Allied bombing had destroyed all but one of his latest models,
the Z4
program calculus
Minimal Hardware Programming:
Pseudocodes
What was wrong with using machine code?
Poor readability
Poor modifiability
Expression coding was tedious
Machine deficiencies--no indexing or floating point
Pseudocodes: Short Code
Short Code developed by Mauchly in 1949 for BINAC computers
Expressions were coded, left to right
Example of operations:
01 – 06 abs value 1n (n+2)nd power
02 ) 07 + 2n (n+2)nd root
03 = 08 pause 4n if <= n
04 / 09 ( 58 print and tab
IBM 704 and Fortran
Fortran 0: 1954 - not implemented
Fortran I:1957
Designed for the new IBM 704, which had index registers and floating
point hardware
- This led to the idea of compiled programming languages, because
there was no place to hide the cost of interpretation (no floating-
point software)
Environment of development
Computers were small and unreliable
Applications were scientific
No programming methodology or tools
Machine efficiency was the most important concern
Fortran I Overview
First implemented version of Fortran
Names could have up to six characters
Post-test counting loop (DO)
Formatted I/O
User-defined subprograms
Three-way selection statement (arithmetic IF)
No data typing statements
Fortran II
Distributed in 1958
Independent compilation
Fixed the bugs
Fortran 90
Most significant changes from Fortran 77
Modules
Dynamic arrays
Pointers
Recursion
CASE statement
Parameter type checking
Latest versions of Fortran
Fortran 95 – relatively minor additions, plus some deletions
Fortran 2003 - added support for object-oriented programming,
parameterized derived types, procedure pointers, and interoperability with
the C programming language.
Fortran 2008 - support for blocks to define local scopes
Fortran Sample
Syntax
Functional Programming: LISP
List Processing language
Designed at MIT by McCarthy
AI research needed a language to
Process data in lists (rather than arrays)
Symbolic computation (rather than numeric)
Only two data types: atoms and lists
Syntax is based on lambda calculus
Representation of
Two LISP Lists
Representing the lists (A B C D)
and (A (B C) D (E (F G)))
Scheme
Developed at MIT in mid 1970s
Small
Extensive use of static scoping
Functions as first-class entities
Simple syntax (and small size) make it ideal for educational applications
COMMON LISP
An effort to combine features of several dialects of LISP into a single language
Large, complex
THE FIRST STEP TOWARD
SOPHISTICATION: ALGOL 60
Historical Background:
Efforts to design a universal language inspired the development of the
programming language ALGOL 60
Early Design Process:
The syntax of the language should be close to standard mathematical notation
It should be possible to use the language for the description of computing
processes in publications
And programs in the new language must be mechanically translatable into machine
language
ALGOL 60 Overview
ALGOL 60 is result of the modifications made to ALGOL 58
Introduces the concept of block structure, which allows parts of programs to
localized
Passing parameters by means of pass by value and pass by name are
introduced
Procedures are allowed to be recursive
Stack-dynamic arrays are now allowed
Computerizing Business Records: COBOL
Environment of development
UNIVAC was beginning to use FLOW-MATIC
USAF was beginning to use AIMACO
IBM was developing COMTRAN
Flow Matic Sample
Program
COBOL Historical Background
Based on FLOW-MATIC
FLOW-MATIC features
Names up to 12 characters, with embedded hyphens
English names for arithmetic operators (no arithmetic expressions)
Data and code were completely separate
The first word in every statement was a verb
COBOL Design Process
First Design Meeting (Pentagon) - May 1959
Design goals
Must look like simple English
Must be easy to use, even if that means it will be less powerful
Must broaden the base of computer users
Must not be biased by current compiler problems
Design committee members were all from computer manufacturers and DoD
branches
Design Problems: arithmetic expressions? subscripts? Fights among
manufacturers
Sample Cobol
Program
Displaying “Hello World!”
The Beginning of Timesharing: BASIC
Designed by Kemeny & Kurtz at Dartmouth
Design Goals:
Easy to learn and use for non-science students
Must be “pleasant and friendly”
Fast turnaround for homework
Free and private access
User time is more important than computer time
Current popular dialect: Visual BASIC
First widely used language with time sharing
TWO EARLY DYNAMIC LANGUAGES: APL
AND SNOBOL
The only similarity between APL and SNOBOL is there dynamic typing and
dynamic storage allocation
Origins and Characteristics of APL
Kenneth E Iverson designed APL in 1960
It was intended to be a vehicle for describing computer architecture not as a programming
language
It has many powerful operators in order to allow arrays to be manipulated as if they were
scalar variables, however, this creates a problem for implementers of the language
Although it is not widely used, it is still in use today.
TWO EARLY DYNAMIC LANGUAGES: APL
AND SNOBOL
Designed by D.J. Farber, R.E. Griswold, and F.P. Polensky in the early 1960’s
It was designed specifically for text processing.
However, it is rarely used nowadays because it is slower than some other
languages
THE BEGINNINGS OF DATA ABSTRACTION:
SIMULA 67
Design Process
Kristen Nygraad and Ole-Johan Dahl developed Simula I between 1962 and 1964
It was designed exclusively for system simulation
Language Overview
SIMULA 67 is an extension of ALGOL 60
Allowed for support of coroutines using the class construct, which is important
because the idea of data abstraction starts here
Some Important Descendants of the
ALGOL’s
All imperative languages including the object-oriented languages, designed
since 1960 owe some of their design to ALGOL 60
Pascal
Highly used for teaching programming; because of this it lacks some features, such as,
separate compilation and passing an array of variable length
C
Originally designed for systems programming by Dennis Ritchie in 1972
Because of its adequate control structures and data structuring facilities C is adaptive to
many application areas
Some Important Descendants of the
ALGOL’s
Modula-2
Distinguishing features include modules, which provide support for abstract data
types, procedures as types, and low-level facilities for systems programming and
coroutines
Modula-3
To Modula-2 it adds classes and objects for support of object-oriented
programming, exception handling, and support for concurrency
Some Important Descendants of the
ALGOL’s
Delphi
A hybrid language, similar to C++ in that it was created by adding object-oriented
support, along with other things, to an existing imperative language
PROGRAMMING BASED ON LOGIC:
PROLOG
The use of a formal logic notation to communicate computational processes
to a computer
Design Processes
Prolog uses a method for specifying predicate calculus propositions and a
restricted form of resolution
Language Overview
Prolog’s programs consist of a collection of statements or facts
The most common use of Prolog is as a kind of database
HISTORY’S LARGEST DESIGN EFFORT: ADA
Ada was originally developed for the Department of Defense
Language Overview
There are four major features of the Ada language
Packages provide the means for encapsulation of data objects
It includes extensive facilities for exception handling
Allows program units to be generic
OBJECT-ORIENTED PROGRAMMING:
SMALLTALK
Design Process
The concepts that led to the development of Smalltalk came out of the Ph.D.
dissertation work of Alan Kay
Language Overview
The program units of Smalltalk are objects
All computing in Smalltalk is done in the same fashion, passing messages to objects
in order to invoke one of the methods associated with that object
COMBINING IMPERATIVE AND OBJECT-
ORIENTED FEATURES: C++
C++ uses C as a base for which to support many of the concepts introduced by
Smalltalk
Design Process
Modifications to C included the addition of function parameter type checking and
conversion, and classes
Later the additions included inline functions, default parameters, and overloading
of assignment operators
With the above additions to C came the name C with Classes
Not until the inclusion of virtual functions, was the name changed to C++
COMBINING IMPERATIVE AND OBJECT-
ORIENTED FEATURES: C++
Language Overview
C++ provides a collection of predefined classes, along with the possibility of user-
defined classes
Operators in C++ may be overloaded, meaning that the user may create operators
for existing operators
Dynamic Binding is provided by virtual class functions
It also includes exception handling
An Imperative-BasedObject-
Oriented Language: Java
Based on C++ however, numerous constructs have been removed, some
changed, and a few others added
The resulting language provides the power and flexibility of C++, however, it
is smaller, simpler, and safer
Design Process
Java was designed for an application for which their appeared to be no other
language satisfactory enough
This started out as a programming language for embedded consumer electronics
Later it proved to be a useful tool in programming for the web
An Imperative-BasedObject-Oriented
Language: Java
Language Overview
Java employs both types and classes
It does not have pointers, although its reference types provide some of the
capabilities of pointers
Uses a primitive Boolean type mainly for the control expressions of its control
statements
There are no record, union, or enumeration types
Supports only single inheritance
A C-Based Language for the New
Millennium: C#
Part of the .NET development platform (2000)
Based on C++ , Java, and Delphi
Provides a language for component-based software development
All .NET languages (C#, Visual BASIC.NET, Managed C++, J#.NET, and
Jscript.NET) use Common Type System (CTS), which provides a common
class library
1-37
Scripting Languages for the Web
JavaScript
Began at Netscape, but later became a joint venture of Netscape and Sun Microsystems
A client-side HTML-embedded scripting language, often used to create dynamic HTML documents
Purely interpreted
Related to Java only through similar syntax
PHP
PHP: Hypertext Preprocessor, designed by Rasmus Lerdorf
A server-side HTML-embedded scripting language, often used for form processing and database access
through the Web
Purely interpreted
Python
An OO interpreted scripting language
Type checked but dynamically typed
Used for CGI programming and form processing
Dynamically typed, but type checked
Supports lists, tuples, and hashes
1-38
Review Questions
1. What is your opinion of the argument that languages that are to complex are too
dangerous to use, and we should therefore keep all language small and simple
2. Languages is continually evolve. What sort of restrictions do you think are
appropriate for changes in programming languages? Compare your answer with the
evolution of Fortran
3. What are the argument both for and against the idea of a typeless language