Product Description
Programming Language Pragmatics is the most comprehensive programming language textbook available today. Taking the perspective that language design and language implementation are tightly interconnected, and that neither can be fully understood in isolation, this critically acclaimed and bestselling book has been thoroughly updated to cover the most recent developments in programming language design. With a new chapter on run-time program management and expanded co… More >>

Programming Language Pragmatics, Third Edition

5 thoughts on “Programming Language Pragmatics, Third Edition”

  1. This is must read for every compiler engineer.

    This book is 800+ pages of theory behind language design and processing of languages.

    Altought it is very theoretical, it’s very easy to read and well written and a pleasure to read. There are a lot of examples/figures/tables etc to explain things. I recommend people which are totally new to language design/compiler design to first read an introduction text. I can really recommend ‘programming language processors in java’ from Watt and Brown. This is a really good book.

    The title of the book suggest that this book will only cover Language Design. In reality chapter 2, 3,4 and 5 covers in depth resp. Syntax checking (parsing), Names/Scope/Binding, Semantic Analysis and processor architecture.

    Beside in depth analysis of language design (e.g. OO-, functional-, imperative- and logical-languages) it gives some practical implementation advice/tips. E.g. there are only a few compilerbooks which seriously talks about the different parsing error recovery techniques. This book explain some different recovery methods. Probably error recovery is not scientific enough for the other books, but for a compiler user error recovery is really important.

    A last tip: this book comes in 2 editions: a paperback and hardcover edition. If you want to save some money buy the paperback.
    Rating: 5 / 5

  2. Over the years the Compilers: Principles, Techniques, and Tools (2nd Edition) (also knwon as the dragon book) has become the de facto standard for introducing compilers and related topics at universities. This is very unfortunate because “Programming Language Pragmatics” is in a completely different league and should be the one used instead. It gives the student (or the self taught) a complete and through overview of parsing, grammar, automata theory and other key language constructs. What really differentiates this book from others (and most notably the (in)famous “Dragon Book”) is that it does so in a easy to understand manner and with lots of well written examples.

    Many people find compiler and language theory to be dark magic, and it would be wrong not to acknowledge that these subjects are considerably harder than say creating a web page in PHP or writing a small Java/C# program. But much of the confusion also stems from the long history of porly written books which all have lacked explaining key areas or assumed that the readers just know some obscure CS topics beforehand. This book does not travel down that road, it is well written, contains both simple and advanced examples and is simply a delightful read.
    Rating: 5 / 5

  3. Every good programmer should know more than one programming language, that much is almost a consensus. But more than that, every programmer should educate himself about programming languages in general, what they mean and how they work. It’s important to know at least the major programming paradigms, because they form the “mental model” of computation that is available to a programmer in a language from that paradigm.

    And then it’s always illustrative to know about the differences in many common languages, to see where different decisions have been made and what are the consequences. To know that certain legacy languages (e.g. C, Fortran) have features that were not designed because they were the “best” option (for some definition of best), but because the design was constrained by what technology was currently available.

    This knowledge is not only required of compiler writers. It should be required of every good programmer. Compiler writers, of course, must know this, and probably in more detail. But Scott’s book is a good resource about programming languages, in a level of detail that I believe adequate for all programmers.

    There are two main kinds of books on programming languages: they are “survey” and “implementation”.

    Survey books show how things work in a lot of languages, comparing them along the way. Often the comparison gets down to small details that can affect the meaning, or semantics, of similar programs written in these languages. These books contain one individual chapter for every major topic, and inside such a chapter all languages are compared in relation to the topic. For example, one such chapter covers “subroutines” and then compare a host of different languages on how they implement subroutines.

    Implementation books are different: they show how to implement many language features, usually by presenting code for interpreters and compilers. The reader doesn’t learn that Ada permits nested subroutines, but instead how nested subroutines really work and how to implement them in a language, for example. A very good book of this kind is “Essentials of Programming Languages” by Friedman, Wand & Haynes.

    I normally prefer the implementation books. I’m not really interested if Standard Pascal permits functions to be passed as parameters or not; if I do need to write a Standard Pascal compiler I’ll look for a reference manual. I much prefer to know how to implement functions as parameters, and be done with it. Comparing minutiae about extant programming languages can sometimes be very enlightening, and sometimes be mostly dull.

    Scott’s book, however, really shines because it mixes feature descriptions and implementation details in the presentation. It does the usual routine of comparing a lot of different languages, most of the time the more popular ones like C++ and Java, but it then shows how the implementations differ because of differences in features. The book strikes a good balance between “language design” and “implementation” approaches, although it is clearly slanted towards design, and so more of a traditional “survey” book.

    It wins over other survey books by including implementation information about almost every topic, and by the clear writing and style. Also, most survey books concentrate on mainstream imperative languages (nowadays C++, Java, C#) and leave other paradigms to chapters at the end. Scott’s book is a bit better in this respect: the presentation often includes Common Lisp, Scheme and Standard ML in the comparisons. There are separate chapters about functional and logic programming too, but considerations about functional programming are spread in the whole book. This is important because paradigms change, and a good programmer must be able to adapt.

    It’s a good reference for language implementors and good education for most programmers. I look forward to the next editions.
    Rating: 5 / 5

  4. I have always enjoyed reading programming-language and compiler books and most of them are quite tough on a first-read.

    Programming Language Pragmatics is one huge exception. None of the books I have read come close to the clarity that this book exhibits. On many occassions, the choice of words and presentation in this book has made me go ‘Wow, I thought I already knew this stuff…’

    Besides core topics, it has interesting discussion like concurrency, data-abstraction (object-oriented) and non-imperative programming models (functional and logic).

    TOC (with my comments)

    Ch. 1 Introduction

    Ch. 2 Programming Language Syntax (theory of Regular Expression, Context-Free Grammars, Automata etc)

    Ch. 3 Names, Scopes, and Bindings (binding, scope rules, closures etc)

    Ch. 4 Semantic Analysis (attribute grammars, attribute flow, syntax tree etc)

    Ch. 5 Assembly-Level Computer Architecture (keeping the pipeline full, register allocation etc)

    Ch. 6 Control Flow

    (expression evaluation, iteration, recursion, nondeterminacy etc)

    Ch. 7 Data Types (type checking, pointers and recursive types etc)

    Ch. 8 Subroutines and Control Abstraction (stack layout, calling sequences, parameter passing etc)

    Ch. 9 Building a Runnable Program (back-end compiler structure, intermediate forms etc)

    Ch. 10 Data Abstraction and Object Orientation (encapsulation, inheritance, dynamic method binding, multiple inheritance, the object model of smalltalk)

    Ch. 11 Nonimperative Programming Models: Functional and Logic Languages

    Ch. 12 Concurrency (shared memory, message passing etc)

    Ch. 13 Code Improvement (peephole, redundancy elimination, data flow analysis, loop improvement, instruction scheduling, register allocation etc)

    App. A Programming Languages Mentioned

    App. B Language Design and Language Implementation

    This is a very impressive book; truly one of my best investments in books so far.
    Rating: 5 / 5

  5. As the subject suggests, I was surprised to discover how thorough this book really is; many others might claim they cover many languages, but this one really does. On top of that, it uses language easily understood outside of the academia.

    On the flipside, however, I doubt you will get much out of this book if you have not explored several different programming languages already.

    Without a bit of experience in the covered topics you will probably not find the book to be very useful, however. It does not contain any tutorials on the languages it covers, nor does it really go into any depth on many of the features it describes. Its descriptions are very concise, making for a hard read if you dont have an inkling of what he is talking about already.
    Rating: 5 / 5

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.