Programming Languages: Concepts & Principles
Preface
This book arose from a course of the lecture “Languages of Programming”, lectured by the author himself in MSU. The encouragement for writing this book was received, from the absence of accessible literature in which there would have been systematically outlined, firstly the key principles, concepts and ideas making up the basis of the subject and thus being entitled to relative stability, and secondly perspective ideas and tendencies, which would help to orientate in the vast and turbulent world of modern programming languages (PL).
The author faced numerous problems, regardless of the fact that the formation of modern PL took place practically in fort of his eyes.
One was also forced to live through the delightedness experienced due to the creation of the first “languages of high order”, as well as being among those who were absorbed in “refinement” and creation of first translators, relying only on their own savvy. Author lived through experiencing the hopes of creating an “universal PL” through the means of co-operation of the international programming brotherhood, as well as encountering the disappointments of ruthless misuse of funds and efforts on projects and beginnings which were to be without any future prospects.
When as a result of overcoming some of these obstacles mentioned prior, was revealed that it is possible to substantially clarify issues and problems surrounding the crux of the matter (by partially choosing and by partially inventing principles, concepts and ideas), fragments of the book, to the great surprise of the author, appeared to be interesting not only from the perspective of students and fellow-teachers, but also from the perspective of programming professionals and experts in PL.
Apparently the problems with which the author was confronted, while premeditating one of the most substantial aspects of information technology, appeared to be vital problems for a significantly wider range of potential readers, as well as the reflection of the experience of their overcoming, as recounted in the text of the book, interesting and didactic enough.
Noticing this circumstance, the author started, already consciously, relying on not only student audience, but also on more tempted readers, allowing himself hints and analogies, which implied personal experience and even specialist activity in the field of PL. Furthermore, it became even more challenging to distinguish between what was known, recognized and consolidated from that what was just recently understood, systematized and invented. As a result, the genre of the book less defined, “floating” from the primarily planned instructive textbook style towards more of a monograph.
From the perspective of key concepts and principles, defining the modern consistency and perspectives in the field of PL, actual PL aren’t interesting just by themselves, but act rather as sources of examples in discussing the presented position. Because of this, throughout the book the method of PL modelling will be applied. Rather than studying PL as a whole, we preferred to study only their models. Naturally the author tried to provide the necessary basis on any specific PL used, allowing the reader to comprehend the examples written using a specific PL without the use of any additional literature. As the main method of introduction to various PL in this book, the method of “sinking” was adopted. The method being so popular in intensified teaching of foreign languages, also here the knowledge of PL to the reader is offered to be absorbed directly from the examples of programs written using this specific PL (obviously, with the help of detailed and appropriate commentary). Time has shown, that this kind of path guarantees the achievement of the main goal with acceptable expenditure of time and effort. Due to this, the book doesn’t contain accurate descriptions of concrete any PL, those who wish for additional information on them, may use official reports, corporate documentations or textbooks on PL.
It’s unthinkable to discuss thoroughly all (even just the most important) concepts and principles defining modern PL. Thus, selection criteria had to be developed. They’re concerned with problems of programming as a whole, with the appointment of PL and with characteristics of PL that are chosen for discussion. Out of all problems of programming, as the key one is chosen the problem of complexity (of the programs themselves, their creation, the means of their creation and etc.). The fundamental source of complexity is regarded to be the semantic gap, being the incongruous perceptions of models of the world between the potential user and the potential executor of programs (computer). As the fundamental means of overcoming this gap, are highlighted, from one perspective an apparatus of abstraction-concretisation (apparatus of development), and from another perspective an apparatus of prediction-control (defence apparatus). Main target of study is: concepts, principles and ideas, allowing to build conceptually integrative PL with a powerful apparatus of development and a secure defence apparatus.
The book consists of two parts. First one is devoted to fundamental abstractions used in modern PL. PL Ada is used as the main language of examples in this part. PL Ada is convenient in this role, as in one form or another it contains answers to practically all technological problems. In other words, Ada acts as an example of “maximally” modern PL. In contrary, “minimal” PL are presented with the languages of Nicklaus Wirth, being Modula 2 and Oberon (version of 1988).
The second part describes the perspective tendencies in PL. Situational, functional, provable, relational, parallel and object-oriented programming are all described and discussed in this part. Used among example languages are Refal, functional language FP by John Backus, Okkam-2 for programming of transputers, object-orientated Turbo Pascal and others.
The book contains quite a few of practice questions and exercises (usually supplied with hints), used to help the reader to control his own attention, as well as to help the reader to recognise level of mastering the material. Results of these exercises aren’t used in further accounts.
Since the intention of the book emerged 8 years ago and nearly half of the material in the book was written already in the years 1983-1985, was the fear of, whether the book is not outdated even before its publication, justified. Obviously, this is left upon the reader to judge, however the author strived to select fundamental, and from his opinion, perspective concepts and principles, which by their own nature should be more stable than rapidly changing conjunctures.
As an indirect confirmation of such stability, acted a greatly rejoiced by the author fact, that the modern surge (a kind of a “boom”) of interest towards object-oriented programming in essence is a surge of interest towards means of programming that provide rational development of software/ programming services with safe protection of copyright.
However, especially means of development and defence in PL were selected as the most interesting aspects of PL, already at the start of working with the book. Such a remarkable coincidence gives confidence in the appropriateness of the choice, as well as allows considering object-oriented programming not simply as another trend but rather as a natural “closing bracket”. It acts as this sort of a “closing bracket” for another stage in acknowledging a system of values in programming, as well as in our examination of concepts and principles of PL.
As another proof of the thesis about the fundamentality of the principles and concepts discussed in this book, could act the fact that in the end of 1990’s developed standards for creating an updated international standard for programming language Ada (including most modern wishes of the international association of Ada language users and most modern methods of their satisfaction), as well as in the preliminary project on the updated language, dated Feb. 1991, was found a reflection, not only of object-oriented programming, but also of such problems discussed in the book as development of concepts controlling asynchronized processes, development of concepts of type, development of concepts of exceptions and others.
When creating this book, the author was helped by numerous people, who of course hold no responsibility for its shortcomings. The author is delighted to show his gratitude towards V.K. Merezkov for his initiative as well as for his enormous help during the publication of the first edition of the manuscript in NPO "CentrProgramSystem". Great gratitude also to Professors E.L Jushenko, M.R. Shura-Bura, V.N. Redjko, I.M. Witenberg, A.A. Krasilov, S.S. Lavrov, J.J. Osis, E.A. Zhogolev, N.P. Trifonov, G.S. Tseitin for their support and valuable advices, as well as to my own colleagues and first readers V.L. Temov, V.N. Agafonov, V.I. Golovach, A.S Markov, B.G Cheblakov, And.V. Klimov, V.N. Lukin, I. Rakovsky for constructive criticism, to A.L. Aleksandrov, J.H. Zejtlenok, I.Z. Lugovoj and especially to S.I. Rybin for help in preparing the manuscript, and to my own listeners and students for attention, patience and inquisitiveness and finally to my family for understanding and care.
The author tried not to alter the spirit of devotion to the crux of matter and artistic ease, the embodiment of which for him remain gone too soon Andrei P. Ershov, who had time to read the first version of the manuscript and to support the feeling of the author to write “how it flows”, and Adolf L. Fuksman, who some time ago passionately discussed together with V.L. Temov and the author of a joint project for creating an university-level textbook for programming.
V.Sh. Kaufman
Moscow, 1990