Aim
After working through this module you should be familiar with the
variety and structure of the major computer languages, and their
evolution. You should also be able to place any given language in the
context of other languages by its characteristics, and to define the
stages involved in systematically acquiring a ‘new’ language.
Learning objectives
After working through this module you should be able to:
1. Understand the reasons for the proliferation of computer languages.
2. Describe the evolution of computer languages.
3. Describe the typology of computer languages.
4. Place a specific language within the language typology.
5. Select the most appropriate language for a given task.
6. Explain the circumstances under which it is necessary to learn a
new language.
7. Describe the development process in any particular computer
language.
8. Define the steps that can be taken to systematise the language
acquisition process.
Content
Development of computer languages
Typology of languages by major characteristics
Language selection
Language acquisition
Learning Strategy
Read the printed module and the assigned readings and complete the
exercises as requested.
Assessment
Completion of exercises and the CML test at the end of the module.Module 811
Page 811-2
References & resources
Baron, N.S., Computer Languages, Pelican, 1986Module 811
Page 811-3
Objective 1 After working through this section you should be able to understand the
reasons for the proliferation of computer languages.
There are thousands of human languages and dialects, although most of
the world’s population speak one of only three or four. This variety is a
product of millions of years of evolution, including cultural isolation
and contact. Yet in less than fifty years we have created hundreds of
computer languages, if you take into account ‘dialects’. Why some
many in so short a time?
One reason for asking (and attempting to answer) this question is for
the insight it might provide into the phenomenal development of the
computer industry. More importantly, from our point of view, if we are
able to provide some basic answers for this question we will be in a
position to select the right language for a specific problem.
Language Variation
No two computer are identical, but many show similarities based on
common purpose or descent. Most languages have constructs that
allow logical operations, but languages created to solve problems with a
specific logical base (Prolog, for instance) will have a greater range and
complexity of constructs than a general-purpose language. Some
languages are direct descendants of others (Algol led to Pascal which
led to Modula) and therefore have similar syntax and structures.
Generally, however, languages offer great diversity.
One useful way of characterising this is by examining the purpose of a
language: what did the creators of the language expect it be used for?
Some languages — notably Basic and Pascal — were devised to teach
neophyte programmers how to program, and moreover to teach good
programming practice. These languages are generally versatile but lack
the depth that may be required for production work, particularly when
this involves system software.
Most languages are general-purpose production-oriented languages,
designed for the creation of applications in business or science, or in the
home market. These range from the early classics like FORTRAN and
Coble to the modern standards like C and C++. Such languages require
both breadth (to support a range of application areas) and depth. They
may provide complex libraries of pre-defined routines, and extensions
for graphics.
Other ‘languages’ are really development environments, in which a
whole suite of tools for application development (compilers, code
generators, screen design tools) are incorporated. First exemplified byModule 811
Page 811-4
the Smalltalk system, this approach has also been taken by building such
development systems around more conventional languages such as
C++.
Forces of diversity
There are a number of factors that may be important in the development
of a new computer language, and that can help explain the variety of
existing languages.
Creativity
The development of an entire language (even one with a restricted
syntax and semantics) is a complex process, involving major creative
decisions. For some computer scientists this alone may be adequate
motivation.
Commercialism
Whilst the syntax of languages is not patentable, there was in the early
years of the commercial computing (say 1955-1965) significant
commercial advantage from having a versatile language with solid
compiler support. The most notable example of this was IBM’s
development of FORTRAN.
Proselytism
Some languages have been created to facilitate certain programming
techniques, or to advance acceptance of certain programming
methodologies. Pascal was devised to embody structured techniques,
and to lead programmers to a clearer understanding of the advantages
of top-down system design.
Research
Some languages are designed as ‘test-beds’ with which to experiment.
Sometimes (perhaps too often) these ‘escape’ into the outside world
and become production languages for the creation of applications.
Smalltalk might be regarded as an example of this process.
The genesis of most languages, as might be expected, is a complex
combination of these (and other) factors.
Exercise 1
List some of the reasons for creating a new programming language.Module 811
Page 811-5
Objective 2 After working through this section you should be able to describe the
evolution of computer languages.
Given the range of driving forces described in the previous section, we
should not perhaps be surprised at the number of languages that have
been devised. We might, however, be surprised by the ‘range’ of such
languages. Prolog and Modula-2, for example, have almost nothing in
common. They share a small number of English-like terms, but use
completely different constructs. This is because they have a different
purpose, and are not intended to be alternates: what you write in
Modula-2 could perhaps be done in Prolog, but it would be impossible
to create the kind of applications for which Prolog was built. On the
other hand, C and Pascal are quite similar in terms of constructs and
terms, but reflect their different origins and purposes in more subtle
ways.
Of course, all high-level languages must eventually be reduced to
executable machine code. This is the major reason that we are often
able to create equivalent applications that look completely different at a
source code level, but function the same when executed. It is also the
reason why we are usually able to choose a language for a given
project, as most hardware platforms will be able to offer us a variety of
languages and development environments.
Language Evolution
As with biological evolution, it is incorrect to describe the development
of computer languages as ‘progress’. Whilst languages developed in the
last fifteen years are in some ways more complex and sophisticated that
earlier creations, this is largely a reflection of the transfer of emphasis
from engineers to programmers to users.
In the earliest years of the computer era machines were developed by
engineers, and were programmed at a binary level using machine code.
It was assumed, probably correctly, that only people with a strong
background in mathematics and logic would be able to undertake this
task. Also, each machine had a different machine code structure, so
intimate knowledge of the machine itself was essential, and language
manuals were not available.
Compilers
The development of compilers in the early 1950s was the first stage in
the move towards software that could be written by non-engineers, and
towards a variety of languages. A compiler is a program that can turn
more abstract constructs into machine code. This made it possible to
create languages that used more intelligible structures. These went inModule 811
Page 811-6
two directions. The first level of abstraction produced assembly
languages, where the language consists of simple mnemonics for the
instruction set of the processor and a program is a set of direct
manipulations of data in memory. The second level of abstraction was
intended to produce programs that were intelligible at a naturallanguage level, using normal words (LET, ADD, REPLACE …). More
importantly, these high-level languages were designed specifically to
allow programs to be written by codifying actual ‘human’ methods of
problem-solving. Thus adding two numbers together might be achieved
by a statement such as LET A=B+C or just a=b+c, rather than defining
each memory operation required to achieve this task.
The result of this was the development of people who specialised in
defining problems in such a way that they could be solved by writing a
computer program, and then writing the code. Thus was born the
separate job of the computer programmer. (More recently these design
and coding tasks have often be separated, with the systems analyst
assuming a greater rôle.) The most significant of these early high-level
languages were FORTRAN, COBOL, BASIC and ALGOL
High-level languages
FORTRAN (Formula Translator) was created by a team at IBM, and
its wide availability was a major component in the enormous growth of
the company in the 1950s and 60s. Whilst most suited to mathematical
and scientific problems, the language was (and remains) flexible enough
to carry out other tasks.
COBOL (Common Business-Oriented Language) was designed to be a
language for business applications, and reflect this in its strengths (list
and file processing) and in its verbose (or non-cryptic) code. The
continuing longevity is partly attributable to these strengths, but more
to the inertia created by the enormous volume of existing COBOL code
(and the costs involved in re-designing and re-writing in a more
‘modern’ language) and the number of COBOL-trained programmers.
BASIC (Beginners All-Purpose Symbolic Instruction Code) was the
first (and most persistent) language designed specifically for teaching
the programming process.
ALGOL (Algorithmic Language) was designed as an attempt to define a
universally-applicable language, offering an alternative to the close
identification between FORTRAN and IBM hardware. Whilst largely
unused outside Europe, its influence was considerable, due to it’s being
one of the precursors of Pascal. When Niklaus Wirth created Pascal he
based it on his experience as one of the designers of ALGOL, but added
the crucial elements of structured programming that he and EdsgerModule 811
Page 811-7
Dijkstra has advocated. He also intended Pascal as a teaching language,
although it has been extended to become a major production language.
One of the most productive of language designers, Wirth’s languages
are a useful indicator of the evolution of computing in the last thirty
years. Modula, the successor to Pascal, was designed to be a
production version of that language, with its emphasis on structure but
with a full range of libraries and extensions. This was refined
throughout the 1970s and 80s, eventually becoming Modula-2. In the
last decade he has focussed on the development of object-oriented
systems, and on the creation of systems in which applications, the
development environment, the user interface and the operating system
are seamlessly linked. This is exemplified by Oberon, designed as a
complete environment for a specific workstation, but portable (albeit
awkwardly) to run on other operating systems. These ideas have
appeared commercially so far only rarely (most notably in the NeXt
machine), but the micro-kernel approach is being applied throughout
the ‘next generation’ of micro-computer operating systems.
The 1980s have also seen the rise of so-called ‘4GLs’ (like dBASE),
languages in which applications of a specific type can be more readily
developed by non-specialists, and the creation of a group of languages
based on logic (notably LISP and PROLOG) and suited to problems in
the fields of artificial intelligence and expert systems.
The most recent development has been the growth of software
development environments that try to minimise or remove the actual
writing of code, and therefore the need to ‘know’ a specific language.
This approach includes the development of source-code generators and
of application-design systems (‘visual programming’), the aim being to
make it possible for users to create applications.
Generations of languages
The most common way of describing the evolution of languages has
been in terms of generations:
First Generation: Machine Code
Second Generation: Assembly Code
Third Generation: High-Level Languages
Fourth Generation: Application-Generation Languages
Fifth generation: Logic-Oriented Languages
As with most simplifications, this system is partly helpful and partly
unhelpful. As suggested before, the development of languages is driven
by complex forces and the creation of new languages (and the survival
of older ones) is often difficult to understand. Nor is the process in any
meaningful sense a form f progress.Module 811
Page 811-8
Exercise 2
Briefly outline the major stages in the evolution of computer languages.Module 811
Page 811-9
Objective 3 After working through this section you should be able to describe the
typology of computer languages.
There are many reasons why scientist classify things. For biologists this
has always been the most important first step in the process of
understanding origins and linkages. An attempt to classify computer
languages has some of the same aims, but may also be useful for other
reasons. Our interest in the process will largely be for the possible
insights it might yield into the communality of languages, in the
expectation that identifying similarities (and differences) between
languages will aid in the often-difficult task of embracing new
languages.
In this section we will review some of the characteristics of languages
that might be used for classifying them, and we will form a basic
typology based upon certain of these. A typology is a structure into
which occurrences of objects (in this case computer languages) can be
placed by defining their ‘value’ on a small number of criteria (usually
two or at most three). In this case most of the possible criteria will be
‘binary’, in that we can specify two choices (high-level or low-level,
compiled or interpreted), or property and its absence (structured or
non-structured, extensible or non-extensible).
Simple (functional) Distinctions
There are numerous ways in which we can classify computer languages.
We could use the clumsy but persistent ‘generation’ approach described
earlier, but this would place almost all current languages into two
categories: low-level (various forms of assembly language) and highlevel (all other languages). We could also use the simple – but otherwise
unhelpful – distinction between interpreted and compiled languages.
But, as we shall see later, this distinction has as much to do with how a
language is actually implemented than with any inherent feature of the
language itself. Although some languages are always compiled, there
are many others which can function equally effectively in either form.
That C is always a compiled language is a reflection on its origins (to
create system software) and its necessary employment of complex
separate compiling and linking processes.
We could also characterise languages by the data with which they can
be used; this is usually reflected in the variety of data types, and the
emphasis. Some languages support numerical and textual data equally
well, whilst others may have greater facility with numbers (eg.
FORTRAN) or text (eg. LISP or SNOBOL).
Some languages are extensible, in that additions can be made to the
basic grammar to create new grammatical elements. The dominantModule 811
Page 811-10
imperative languages (as defined below) are not extensible in this sense;
if we add extensions (as we have used the term in earlier units) to
Pascal we are really creating a version (or dialect) or Pascal, not an
extension of it in the strict sense. Languages like FORTH and
Smalltalk, on the other hand are defined in a minimal manner, with the
expectation that the programmer will define new elements as required
by the particular application.
A more useful (and to some programmers quite significant) distinction
is between those language designed to be structured, and those that
either do not support structure (have no basic modular units) or have
been re-designed to employ structured concepts. Again, this distinction
is limited in that nearly all languages created in the last 25 years are at
least partly, if not completely, influenced by the principles of structured
programming developed in the late 1960s.
Conceptual Distinctions
A more sophisticated typology is possible if we employ somewhat more
abstract characteristics than those defined so far. Central to these
abstractions is the question of how a computer languages approaches is
basic purpose, namely the creation of solutions to specified problems.
Algorithmic languages
The most common approach to problem-solving in computing is
embodied in most languages: the algorithm. Problems are solved by
defining a series of steps which, when carried out systematically, will
result in a solution. A computer program is simply the implementation
of an algorithm. The languages with which we most familiar —
FORTRAN, COBOL, PASCAL, BASIC — and in which most
software is written are all examples of this group of languages. They are
also know as imperative languages.
Functional languages
An alternative approach is to treat solutions as an aggregate of
applications of mathematical functions. Languages based on this
somewhat abstruse idea are called functional or applicative, and are
relatively little-known, if influential. The most significant has been LISP
(List Processing); others include APL (A Programming Language) and
SNOBOL (String Oriented Symbolic Language). Their major influence
has been on the development of logical programming languages.
Object-oriented languages
Although we can apply OOP principles in a number of standard