Understanding Programming Languages

Peter Kitson

ISBN : 0471958468

Order a printed copy of this book from Amazon.

Cover Design - Understanding Programming Languages

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)



Sample Chapter From Understanding Programming Languages
     Copyright © M. Ben-Ari

The author of a text on programming languages must necessarily offend at least 3975 of the 4000 or so inventors of programming languages! I made the conscious decision to focus on a very small number of languages (even if it means offending 3994 people), because I believe that I can explain most language concepts using these languages. Other languages are mentioned or surveyed only if they demonstrate some concept that is not found in the languages chosen for the mainstream of the presentation.

Much of the book is concerned with “ordinary” imperative languages and two languages have been chosen from this class. Representing languages with a low level of abstraction is C, which has overtaken Fortran as the dominant language in this category. To represent a higher level of abstraction we have chosen Ada which offers a much cleaner definition than the more widely known Pascal.

An additional justification for these choices is that both languages have extensions (C++ and Ada 95) that we can use to study language support for object-oriented programming, currently the dominant programming method.

Unfortunately (I believe) most programming today is still done in imperative languages, but in recent years the quality of implementations for non-imperative languages has improved so that they can be used to develop “real” software. The final chapters introduce functional (ML) and logic programming (Prolog) languages in the hope of convincing the student that imperative languages are not conceptual necessities for programming.

The theory of programming language syntax and semantics is beyond the scope of this text. These important subjects are best left to more advanced courses. To prevent confusion when comparing examples from different languages, an indication like C++ is attached to each example. In a section that discusses constructs in a specific language, no indication will be given.

Teaching recommendations

The prerequisite for this book is at least one year of programming in some language such as Pascal or C. In any case, the student should have a basic reading knowledge of C. A familiarity with the structure and machine code of some computer will also be helpful.

There is too much material for a single course. Parts I and II together with portions of Part IV on modules and object-oriented programming can form the basis of a one-semester course for second-year undergraduates. For advanced undergraduates, the first half can be quickly reviewed in order to concentrate on the more difficult material in Parts III and IV. An advanced course should certainly include Part V supplemented by more material on some non-imperative language chosen by the instructor. Starred sections are more appropriate for advanced students. Students should also be taught how to examine the assembly language instructions that are emitted by the compilers that they use.

Exercises: since this is a book on programming languages and not on programming, the emphasis in the exercises is not on programming projects. Instead, we ask the students to dig into language descriptions, compare languages and verify compiler implementations of language constructs. The instructor is encouraged to tailor the exercises and append others, according to personal taste andthe availability of tools.

The book will also be useful to programmers who wish to deepen their knowledge of the tools they use daily: programming languages.