# Preface

It is a fallacy to say that progress consists of replacing the workable by the new. The brick was invented by the Babylonians and has been used virtually unchanged for 2500 years. Even now, despite the advent of curtain-walling, the brick is still the primary building material. Likewise, the long-predicted revolution in computer programming to be produced by the introduction of fourth- and fifth-generation languages has not come to pass, almost certainly because their purported advantages are outweighed by their manifest disadvantages. Third-generation languages are still used for the bulk of the world's programming. Algol 68 has been used as a paradigm of third-generation languages for 32 years.

Each computer programming language has a primary purpose: C was developed as a suitable tool in which to write the Unix operating system, Pascal was designed specifically to teach computer programming to university students and Fortran was designed to help engineers perform calculations. Where a programming language is used for its design purpose, it performs that purpose admirably. Fortran, when it first appeared, was a massive improvement over assembler languages which had been used hitherto. Likewise, C, when restricted to its original purpose, is an admirable tool, but it is a menace in the hands of a novice. However, novices do not write operating systems.

According to the “Revised Report on the Algorithmic Language Algol 68” (see the Bibliography), Algol 68 was “designed to communicate algorithms, to execute them efficiently on a variety of different computers, and to aid in teaching them to students”. Although this book has not been geared to any specific university syllabus, the logical development of the exposition should permit its use in such an environment. However, since no programming expertise is assumed, the book is also suitable for home-study.

It is time to take a fresh approach to the teaching of computer programming. This book breaks new ground in that direction. The concept of a variable (a term borrowed from mathematics, applied to analogue computers and then, inappropriately, to digital computers) has been replaced by the principle of value integrity: in Algol 68, every value is a constant. All the usual paraphernalia of pointers, statements and expressions is dispensed with. Instead, a whole new sublanguage is provided for understanding the nature of programming.

This book covers the language as implemented by the DRA a68toc translator. Since the last edition, a new chapter on the Standard Prelude has been added, thereby bringing together all the references to that Prelude in the rest of the book. This edition is an interim edition describing the QAD transput provided with the Algol68toC package.

It has been a conscious aim of the author to reduce the amount of description to a minimum. It is advisable, therefore, that the text be read slowly, re-reading a point if it is not clear. This is particularly true for chapter 5 where the concept of the name has been introduced rather carefully. The exercises are intended to be worked. Answers to all the exercises have been given except for those which are self-marking.

A program written for use with the book can be found in the same directory as this book.

I should like to thank Wilhelm Klöke for bringing the Algol 68RS compiler to my attention and James Jones and Greg Nunan for their active help in the preparation of the QAD transput.

In 40 years of programming, I have had many teachers and mentors, and I have no doubt that I have benefited from what they have told me, although now it is difficult to pinpoint precisely which part of my understanding is due to which individual. Any errors in the book are my own. If any reader should feel that the book could be improved, I should be grateful if she would communicate her suggestions to the publisher, so that in the event of another edition, I can incorporate those I feel are appropriate (she includes he).

Sian Mountbatten
Inverness
January 2012