Chapter 2 - Revised
Chapter 2 - Revised
Evolution of the
Major Programming
Languages
Amid the strife of war...
1936-1945
Konrad Zuse (Tsoo-zuh)
– Built a series of complex computers from
electromechanical relays
– Developed a language called Plankalkul for
expressing computations
Unpublished until 1972
ShortCode
A Step Toward Readability/Writability
1949
John Mauchly
– Developed a language named ShortCode for the BINAC
It consisted of coded versions of mathematical expressions
Example statement: 00 X0 03 20 06 Y0
– Meaning X0 = SQRT(ABS(Y0))
– X0 and Y0 were variable names; 03 the assignment opearator, 20
sqrt, and 06 absolute value
Machine implementation was pure interpretation, which was
termed automatic programming.
More readable and writable than keying in the machine code
equivalent, but at a cost of running 50 times slower.
1950s
Compiling systems
Relocatable code
Assembly languages
Fortran 0, I, II
AI – FLPL; IPL-I, LISP
Business – Flowmatic & COBOL
ALGOL
Keep in Mind the Initial Context
1950-1953
Grace Hopper and her team at UNIVAC
– Developed a “compiling system” named A-0, A-1,
and A-2
– Programs were written in a type of code called
pseudocode which was expanded into machine
code subprograms
Progress in Generality
1950
David J. Wheeler
– Developed a method of using blocks of
relocatable addresses.
1951
Maurice Wilkes
– Extended this idea to design an assembly
program that could combine chosen subroutines
and allocate storage.
Speedcode System
Support for Floating Point Operations
Early 1950s
John Backus
– Developed a Speedcode system for the IBM 701
which extended machine code to include floating-
point operations.
– Instruction set included the four arithmetic
operations for floating points, sqrt, sine, arc
tangent, exponent and logarithm; conditional and
unconditional branching; I/O conversions.
First Real Compiler?
1952
Alick E. Glennie
– Developed Autocode compiler for the Manchester Mark I computer
Lowlevel and machine oriented
OR
1953
Laning and Zierler
– Developed an algebraic translation system
Used function calls and included arrays and branching instructions
Implemented on the MIT Whirlwind computer
Generated a subroutine call to each formula, expression
Easy to read
Used within MIT
Fortran
A Significant Step Up – First Important High Level Language
1954
IBM 704
– Provided hardware for indexing and floating point instructions
John Backus and group at IBM
– Implementation began in 1955
– Released in 1957 as Fortran I.
Types and storage for all variables fixed before run time – efficiency vs. flexibility
Included I/O formatting
Variables of up to six characters
User-defined subprograms
If and Do statements
Implicit data types – I-N for integers
18 worker-years of effort
Huge success
AI and Fortran
Mid 50s
IBM
– FLPL (Fortran List Processing Language)
Extension to the Fortran compiler
– Used to construct a theorem prover for plane geometry
First AI Programming Language
IPL - Information Processing Language
1956
Allen Newell, J.C. Shaw, Herbert Simon
– Published a description of one of the first AI
languages
IPL-I
– Information Processing Language
The Business Domain
1957
FLOW-MATIC
– Business oriented language for the UNIVAC
– “mathematical programs should be written in
mathematical notation, data processing programs
should be written in English statements” – Grace
Hopper 1953
The Business Domain
1959
COBOL 60
– Common Business Oriented Language
Design Goals
– Use English as much as possible
– Easy to use, even at the expense of being less powerful..
– Not be overly restricted by the problems of its implementation
Characteristics
– DEFINE verb for macros
– Records
– 30 character names with hyphens
– Data division and procedure division
– Mandated by the DOD
– Example on pages 65-67
– Standardized versions in
1968; 1974 (subprograms with parameters), 1985, 2002...
Fortran progresses
1958
Fortran II compiler
– Bug fixes
– Independent compilation of subprograms
Made lengthier programs possible
ALGOL
Algorithmic Language
1958
GAMM (Society for Applied Mathematics and Mechanics) and ACM (Assoc. for Computing Machinery)
ALGOL 58 – A Universal Standard Language
Design Goals
– The syntax should be as close as possible to standard mathematical notation, and programs written in ti should be readable with
little further explanation
– It should be possible to use the language for the description of algorithms in publications.
– Programs in the new language must be mechanically translatable into machine language.
Characteristics
– Machine independent
– Flexible & powerful
– Simple and elegant
– Generalized many of Fortran’s features
Identifiers of any length; any number of array dimensions, lower bound of arrays set by programmer; nested selection
statements.
– Formalized the data type concept
– Compound statements
– := assignment operator
Both John Backus and Peter Naur served on the committee which created ALGOL 60 as did Wally Feurzeig, who later created Logo.
LISP
1959
John McCarthy and Marvin Minsky
– Produced a system for list processing
– LISP
A functional language
Dominated for a decade
Originally interpreted
Example diagrams and program on pages 54-55.
Decendents are:
– Scheme
– COMMON LISP
Related Language - ML
1960s
IPL-V
ALGOL-60
APL
SNOBOL
Fortran IV
BASIC
PL/I
SIMULA
ALGOL-68
Progress in AI
1960
Newell and Tonge
– IPL-V
Demonstrated that list processing was feasible and
useful.
Actually an assembly language implemented in an
interpreter with list processing instructions for the
Johnniac machine
ALGOL 60
1960
ALGOL 60
– Formally described using Backus-Naur Form
– Example on pages 61-62
– New additions
Block structure concept
Pass by value and pass by name
Recursive procedures
Stack-dynamic arrays
– Note that formatted I/O was omitted due to goal of machine
independence
– Parent
Fortran
– Descendents
PL/I, SIMULA 67, C, Pascal, Ada, C++ and Java
APL and SNOBOL
1960
APL
– Kenneth Iverson at IBM
– Designed for describing computer architecture
Odd character set required for operators
Expressivity vs. readability
– Implemented in mid 60s
SNOBOL
– D. J. Farber, R. E. Griswold, and I.P. Polonsky at Bell Labs
– Designed for text processing.
– Collection of powerful operations for string pattern matching
Common features
– Not based on a previous language nor a basis for any languages
– Dynamic typing and hence storage allocation
Fortran IV
1962
Fortran IV
– One of the most widely used PLs
– Explicit type declarations for variables
– Logical If construct
– Capability of passing subprograms as parameters
1966
– Fortran 66 – its Standardized version
BASIC
Let’s make it easy…
1963
John Kemeny and Thomas Kurtz
– Designed BASIC
Beginner’s All-purpose Symbolic Instruction Code
– Goals
1. Must be easy for non-science students to learn and use
2. Must be pleasant and friendly
3. Must provide fast turnaround for homework
4. Must allow free and private access
5. Must consider user time more important than computer time!’
– Characteristics
Small, nonteractive
Used through terminals
Single data type – fp – numbers
Resurgence with Visual BASIC in 90s.
PL/I
A Single Universal Language
1964
IBM
– Developed PL/I
– Contributions
ALGOL 60’s recursion and block structure
Fortran IV’s separate compilation with communication via global data
COBOL 50’s data structures, I/O and report generating facilities
A collection of new constructs
– Concurrently executing subprograms
– Exception handling for 23 different types of exceptions
– Allowed the disabling of recursion for more efficient linkage
– Pointers as data types
– References to cross sections of Arrays
Simula 67
1967
Kristen Nygaard and Ole-Johan Dahl
– First developed SIMULA I in the early 60s
Designed for system simulation, implemented in mid-60s
Generalized into Simula 67
– Features
Extension of ALGOL 60 taking block structure and control
statements
Support for coroutines via the class construct thus beginning
the concept of data abstraction
– Encapsulation of data and processes that manipulate the data
– Class definition as a template
– Constructors
ALGOL 68
Dramatically Different
1968
ALGOL 68
User defined data types
Flex arrays – Implicit heap-dynamic arrays
Orthogonality – a few primitive concepts and
unrestricted use of a few combining mechanisms
1970s
Pascal
C
Prolog
Scheme
Fortran 77
Ada
Pascal
1971
Niklaus Wirth
Developed Pascal based on ALGOL 60
– Primarily used as a teaching language
Simple but expressive
– Lacked essential features for many apps which
led to non-standard dialects such as Turbo Pascal
– Example on pages 80-81
C
1972
Dennis Ritchie
Developed the C language
– Heritage was
CPL - Cambridge early 60s
BCPL – Martin Richards 1967
– B – Ken Thompson 1970 First HLL under Unix
C
and ALGOL 68
Scheme
A Functional Programming Language
1975
MIT
– Scheme
Small size
Exclusive use of static scoping
Functions are first-class entities – can be values of
expressions and elements of lists; assigned to variables;
passed as parameters and returned as values of function
applications.
Simple syntax and semantics
Fortran 77
Continues to Dominate
1978
Fortran 77
– Character string handling
– Logical loop control statements
– If else
– “Fortran is the “lingua franca” of the computing
world..” Alan Perlis
1980s
Smalltalk
ADA
ML
Common LISP
Miranda
C++
Smalltalk
1980
Alan Kay who predicted computer “desktop”
windowing environment
– Developed the first language that fully supported
OOP as a part of the Xerox Palo Alto Research
Center (PARC) group
Charged with task of designing a lanuage to support
Kay’s vision.
Objects and message passing
Example on pages 93-94
MetaLanguage
Functional Language Interest Continues
1980s
Robin Milner
– ML (MetaLanguage)
Functional but supports imperative
Syntax similar to imperative
ADA
1983
DOD
– Most extensive and expensive language design
effort
Features
– Packages
– Exception handling
– Generics
– Concurrency support
LISP
1984
COMMON LISP
– Designed to combine features of a number of
differenct dialects of LISP that were developed
during the 70s and 80s.
– Large and complex
– Allows both dynamic and static scoping
– Basis is pure lisp
Miranda
1984
David Turner
– Miranda
Based on ML, SASL, and KRC
Functional, no variables, no assignment statement
Haskell is based on Miranda
– But has the unique feature of lazy evaluation - No
expression is evaluated until its value is required
C++
Bjarne Stroustrup at Bell Labs
– Made the first step from C to C++ with C with Classes language int 1983
– Goals
provide a language with classes and inheritance
No performance penalty – reason array index range checking was not considered
It could be used for every application ofr which C was used – so left unsafe features of C
– Progression
1980
– Addition of function parameter tyep checking and conversion
– Classes like those of SIMULA 67 and Smalltalk
– Derived classes, public/private access, constructors/destructors, friends.
1981
– Inline functions, default parameters, overloading
– 1984
Named C++ - virtual methods, dynamic binding of method calls to method definitions, reference types
– 1985
First available implementation named Cfront which translates C++ programs into C programs
Continued to evolve
– multiple inheritance, abstract classes
– Templates which provide parameterized types and exception handling
– 2002 - .NET
1990s
Fortran 90
Fortran 95
ADA 95
Java
Fortran 90
1990
Fortran 90
– Dynamic arrays
– Records
– Pointers
– Multiple selection statement
– Modules
– Recursion
– Obsolescent-features list
– Dropped fixed format of code requirement
– Fortran vs. FORTRAN
– Convention – keywords & identifiers in uppercase
Fortran 95
1995
Fortran 95
– Forall added for parallelizing..
– See code example on page 50-51.
ADA 95
Features
– Adding new components to those inherited from a base
class.
– Dynamic binding of subprogram classes to subprogram
definitions (polymorphism)
– Protected objects
Success hindered by C++
Scripting Languages
Sh (shell) – a small collection of commands
interpreted as calls to system subprograms to
perform utility functions with added varaibels, control
flow statements, functions andetc
– Ksh – David Korn ’95
Awk – Al Aho, Brian Kernighan, Peter Weinberger
(’88) began as a report generation language
Tcl – John Ousterhout ’94
Perl – Larry Wall – designed as a UNIX tool for
processing text files. Common Gateway Interface
language as well.
Scripting Languages
Fortran 2003
C#
…
Fortran 2003
2003
Fortran 2003
– Parameterized derived types
– OOP support
– Procedure pointers
– C interoperability