Chapter 2

Evolution of the Major Programming Languages

 

Zuse’s Plankalkül

·        Plankalkül is the name of a programming language written by a German scientist by the name of Konrad Zuse, between 1936 and 1945

·        This language was never implemented

·        Its name means program calculus

 

MINIMAL HARDWARE PROGRAMMING: PSEUDOCODE

·        Deficiencies in machine code and assembly language code led to the development of somewhat higher–level languages

·        Short code – developed by John Mauchly in 1949

-         Implemented with a pure interpreter

-         Simplified the programming process; however, it was approximately 50 times slower than machine code

·        Speedcoding – developed by John Backus in 1954

-         Extended machine languages to include floating-point operations

-         Backus claimed that problems that could take two weeks to program in machine code could be programmed in a few hours using Speedcoding

·        The UNIVAC “compiling system – developed by a team led by Grace Hopper between 1951 and 1953

-         It made machine code source programs much shorter; however it was still quite primitive

 

THE IBM 704 AND FORTRAN

·        Historical Background

-         The first widely accepted high-level language was FORTRAN

-         FORTRAN was developed in large measure for the capabilities of the IBM 704 system

-         The IBM 704 system was first introduced in 1954

·        Design Process

-         Plans for FORTRAN were actually begun before the announcement of the IBM 704 system

-         The report titled “The IBM Mathematical FORmula TRANslating System” described the first version of FORTRAN

-         It stated that FORTRAN could provide the efficiency of hand-coded programs and the ease of programming the interpretive pseudocode systems

-         It also stated that it would eliminate coding errors and the debugging errors

·        FORTRAN I Overview

-         All of FORTRAN I’s control statements were based on 704 instructions

-         There are no data-typing statements; instead variables whose names began with I, J, K, L, M, and N are implicitly integer type, and all others were implicitly floating-point type

-         FORTRANS claim that the machine code produced by the compiler was as efficient as what could be produced by hand was nearly achieved

·        FORTRAN II Overview

-         Introduced in the spring of 1958

-         Fixes a lot of the bugs in FORTRAN I and adds some significant features, such as, independent compilation of subroutines

·        FORTRAN IV, FORTRAN 77, and FORTRAN 90

-         FORTRAN III, although developed, it was never a big success

-         FORTRAN IV became one the most widely distributed programming languages until 1978

-         FORTRAN IV is a big improvement over FORTRAN II because of additions to it, such as, explicit type declaration for variables, a logical IF construct, and the capability of passing subprograms

-         FORTRAN 77 is introduced in 1977, it retains most of the FORTRAN IV features and adds to it, character string handling, logical loop control statements, and an IF with an optional ELSE clause

-         FORTRAN 90 is the latest version of FORTRAN is dramatically different than FORTRAN 77

-         It supplies a collection of built in functions for array operations

-         Arrays can be dynamically allocated and deallocated on command

-         New control statements, such as, CASE, EXIT, and CYCLE are added

-         Recursion is now possible

 

FUNCTIONAL PROGRAMMING: LISP

·        The first functional programming language was invented to provide language features for list processing, which grew out of the applications in artificial intelligence

·        The Beginnings of Artificial Intelligence and List Processing

-         Interest in AI appears in the mid-1950’s

-         This interest comes from the study of linguistics, psychology, and mathematics

-         Linguistics because of the interest in the processing of a natural language

-         Psychology because of the interest in modeling human information storage and retrieval, along with other brain processes

-         Mathematics because of the interest in mechanizing certain intelligent processes

-         The concept of list processing was introduced in 1956 by Allen Newell, J.C. Shaw, and Herbert Simon

-         A few languages are developed and implemented for list processing but none become really popular until the development of LISP

·        LISP Design Process

-         Developed by John McCarthy and Marvin Minsky at MIT, because of their dislike for the other languages developed for AI

·        Language Overview

-         There are only two data structures, atoms and lists

-         Atoms are either symbols or numeric literals

-         Lists are specified by delimiting their elements with parentheses and may be simple or nested lists

-         A list is stored internally as a single-linked list structure

·        Processes in Functional Programming

-         All computation in a functional program is accomplished by applying functions to arguments

-         Iterative processes can be specified with recursive function calls, which means no loops

·        The Syntax of LISP

-         Program code and data have exactly the same form

·        Evaluation

-         LISP is still the most widely used language for AI

-         In the 1970’s and 1980’s many different dialects of LISP were developed, which led to the problem of portability

-         In order to solve the problem of LISP’s portability issue, COMMON LISP was developed as a standard version

·        Two Descendants of LISP

-         These two dialects are Scheme and COMMON LISP

-         Scheme was developed in 1975

-         It is relatively small in size and uses static scooping exclusively

-         Scheme functions can be values of expressions and elements of lists; they can be assigned to variables, passed as parameters, and returned as values.  These features were not available in the early versions of LISP

-         COMMON LISP was developed in 1984

-         It takes the features of a few dialects and scheme and combines them into one language; while Scheme is a relatively small language, COMMON LISP is relatively large language and uses dynamic as well as static scooping

·        Related Languages

-         Three related functional programming languages are ML, Miranda, and Haskell

-         MetaLanguage or ML was designed in the 1980’s by Robin Milner

-         ML is a functional language, which supports imperative programming

-         Miranda was designed by David Turner in the 1980’s as well; It is based on ML, SASL, and KRC

-         Haskell is based on Miranda and was designed by Hudak and Fasel in 1992

 

THE FIRST STEP TOWARD SOPHISTICATION: ALGOL 60

·        Historical Background

-         Efforts to design a universal language inspired the development of the programming language ALGOL 60

-         In the late 1950’s, all of the languages that had been developed thus far were for single architectures only

-         Two user groups SHARE and USE showed an interest in forming a committee through the ACM organization, in order to study and recommend the design and implementation of a universal programming language

-         Another group in Europe (GAMM) also was interested and in 1958 the ACM committee along with GAMM officially agreed to a joint language design project

-         FORTRAN was not considered because of its sole ownership by IBM.

·        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 58 Overview

-         The first language designed in this project was ALGOL 58

-         ALGOL comes from the original name of the language, which is the International ALGOrithmic Language

-         Many of the features in ALGOL 58 were derived from FORTRAN

-         It generalized FORTRAN’s features and added several new constructs and concepts

·        ALGOL 60 Design Process

-         ALGOL 58 was furiously debated, resulting in modifications and additions to the language and the development of ALGOL 60

·        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

·        ALGOL 60 Evaluation

-         ALGOL 60 succeeded in becoming the only acceptable formal means of communicating algorithms

-         All imperative languages formed after 1960 are either direct or indirect descendants to ALGOL 60

-         It was the first language whose syntax was formally described

-         Unfortunately, ALGOL 60 never achieved widespread use, because it was too flexible and it lacked input and output statements

 

COMPUTERIZING BUSINESS RECORDS: COBOL

·        Although COBOL has been used more than any other programming language it has ahd little effect on the design of any other languages, with the exception of PL/I.

·        Historical Background

-         Similar to ALGOL, COBOL was designed by a committee

-         Three other languages for business applications that existed before COBOL were FLOW-MATIC, AIMACO, and COMTRAN

·        COBOL Design Process

-         The biggest concern regarding this new application language was that it be easy to use, even at the expense of being less powerful

-         The language specifications for COBOL were published in 1960

·        Evaluation

-         COBOL originated a number of concepts, such as, constructs for macros, implementation of hierarchical data structures, allowed connotative names

-         It was the first language whose use was mandated by the Department of Defense

-         The poor performance of the early compilers made COBOL expensive to use, fortunately with the advent of better compiler designs and the mandate of the Defense Department COBOL became very popular

 

THE BEGINNINGS OF TIME SHARING: BASIC

·        Similar to COBOL, BASIC has had widespread use, however it has gotten little respect

·        Design Process

-         BASIC was designed at DARTMOUTH University in the 1960’s by John Kemeny and Thomas Kurtz

-         The goals of the BASIC system were to make it easy for non-science students to learn, be pleasant and friendly, provide fast turnaround for homework, allow free and private access, and consider user time more important than computer time

-         The combination of the second, third, and fourth goals mentioned above led to the timeshared aspect of BASIC

·        Language Overview

-         The original version was very small having only fourteen different statements, and was not interactive, for there was no way to get user input from the terminal

-         Overall, it was very limited making it very easy to learn

·        Evaluation

-         BASIC was the first widely used method of remote access to a computer

-         Most of its design came from FORTRAN with some minor influence by ALGOL 60

-         Reasons for BASIC’s success are probably it’s ease for which it can be learned and implemented

-         Two contemporary versions of BASIC are QuickBasic and Visual BASIC

 

EVERYTHING FOR EVERYBODY: PL/I

·        PL/I represents the first large-scale attempt to design a language that could be used for a broad spectrum of application areas

·        Historical Background

-         Developed as an IBM product

-         Designed to replace FORTRAN, COBOL, LISP and the systems applications of assembly language

·        Design Process

-         The first version of PL/I was originally named FORTRAN VI because the initial design was just an extension of FORTRAN IV

-         The design along with the name was quickly dropped and the new design was called NPL for new programming language

-         The name change to PL/I resulted in the avoidance of confusing the name NPL with the National Physical Laboratory in England, since this was were PL/I was developed

·        Language Overview

-         PL/I included the best of ALGOL 60 (recursion and block structure), FORTRAN IV (separate compilation with communication through global data), and COBOL (data structures, input/output, and report generating facilities), along with a few new constructs

-         PL/I was the first language to have programs allowed to create concurrently executing tasks, the possibility to detect and handle 23 different types of exceptions, procedures allowed to be use recursively, pointers included as a data type, and reference to the cross sections of arrays

·        Evaluation

-         The problem with PL/I is it’s complexity due to it’s large size

-         It also suffered from what are now considered to be poorly designed constructs

-         However, it did get significant use in both business and scientific applications

 

TWO EARLY DYNAMIC LANGUAGES: APL AND SNOBOL

·        Neither of these languages are based on any previous language and neither have had much affect on any later languages

·        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.

·        Origins and Characteristics of 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

 

ORTHOGONAL DESIGN: ALGOL 68

·        Design Process

-         Introduces the design criteria of orthogonality, which results in features, such as, the inclusion of user-defined data types and implicit heap-dynamic arrays

·        Evaluation

-         Introduces a significant number of features not previously used

-         Although it may be contrasted with PL/I, PL/I gained a far greater acceptance than ALGOL 68

 

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

-         Designed by Niklaus Wirth

-         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

-         A reason for both like and dislike of C is its lack of complete type checking

-         C tends to be a very flexible language

·        Modula-2

-         Designed by Niklaus Wirth in 1976 (also designed Pascal)

-         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

-         Based on Modula-2 and Modula-2+

-         To Modula-2 it adds classes and objects for support of object-oriented programming, exception handling, garbagfe collection, and support for concurrency

·        Oberon

-         Loosely based on Modula-2 was written by Niklaus Wirth

-         Although many features were added to Modula-2 to come up with Oberon many were subtracted also.

-         The main feature added is type extension, which supports object oriented programming

-         Among those removed are variant records, opaque types, enumeration types, sub-range types, the CARDINAL type, non-integer array indexes, the with statement, and the for statement

·        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

-         It is derived from Pascal, therefore making it much more elegant and safe than C++

 

PROGRAMMING BASED ON LOGIC: PROLOG

·        The use of a formal logic notation to communicate computational processes to a computer

·        Design Processes

-         Alain Colmerauer, Phillip Roussel, and Robert Kowalski developed the design of Prolog

-         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

·        Evaluation

-         There are two major reasons why logic programming has not become widespread

-         The first reason is that it has been proven to highly inefficient

-         The second reason is that it has been shown to effective for only few areas of application, such as, certain kinds of database management and some areas of AI

 

HISTORY’S LARGEST DESIGN EFFORT: ADA

·        Ada was originally developed for the Department of Defense

·        Historical Background

-         The Army, Navy, and Air Force all proposed the development of a high-level language for embedded systems in 1974 as an attempt to standardize their own embedded systems

·        Design Process

-         The committee assigned to this task was responsible for identifying requirements for a new Department of Defense high-level language, evaluating the existing languages to determine whether there was a viable candidate, and recommend adoption or implementation of a minimal set of programming languages

-         The resulting language went through multiple phases and was named Ada

·        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

-         It provides for concurrent execution of special program units and named tasks

·        Evaluation

-         The Ada language contains most of the concepts of software engineering and language design

-         The development of a compiler was a difficult task and almost four years after the design of the Ada language was completed, did the Ada compiler appear

 

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 assosciated 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++

·        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

-         Both functions and classes can be templated, which means that they can be parameterized

-         It also includes exception handling

·        Evaluation

-         C++ has become extremely popular

-         On the downside, C++ is extremely large and suffers some drawbacks similar to PL/I

·        A Related Language: Eiffel

-         Like C++ Eiffel combines both imperative and object-oriented features

 

PROGRAMMING THE WORLD WIDE WEB: 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

·        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

-         Provides garbage collection

·        Evaluation

-         Designers of Java have eliminated many of the features that are considered unsafe in C++

-         Java is still considered a complex language and its lack of multiple inheritance is said to lead to some peculiar designs

-         The use of Java has increased much faster than the use of any other language