This text develops a comprehensive theory of programming languages based on type systems and structural operational semantics. Language concepts are precisely defined by their static and dynamic semantics, presenting the essential tools both intuitively and rigorously while relying on only elementary mathematics. These tools are used to analyze and prove properties of languages and provide the framework for combining and comparing language features. The broad range of concepts includes fundamental data types such as sums and products, polymorphic and abstract types, dynamic typing, dynamic dispatch, subtyping and refinement types, symbols and dynamic classification, parallelism and cost semantics, and concurrency and distribution. The methods are directly applicable to language implementation, to the development of logics for reasoning about programs, and to the formal verification language properties such as type safety. This thoroughly revised second edition includes exercises at the end of nearly every chapter and a new chapter on type refinements.
Robert Harper is a Professor of Computer Science at Carnegie Mellon University.
Librarian Note: There is more than one author in the Goodreads database with this name. This profile may contain books from multiple authors of this name.
While not a bad book, this should not be a first book on type theory and programming languages.
Robert Harper's syntax is terse to put it kindly and his lack of concrete examples can make an already abstract topic unapproachable. Additionally, he uses notation used and known only to him. This notation is consistent throughout his book but differs greatly from, e.g., Pierce's Types and Programming Languages which follows existing literature much more closely.
This approach I think works well when you have already seen the material before and would like some insight into some subtleties of the theory (for example, describing a context as a set is not sufficient in all cases).
Learn a ton reading this book. It starts off fairly easy with the level of abstraction picking up slowly from there. Lots of ground is covered by this book. I found so many answers to questions about programming languages and type theory.
This book was above my math/logic capacities. I dropped it for now, but my goal is to go back for it in the future, after refining my knowledge on those domains.
The book contains a lot of great stuff but is also a bit tedious and challenging to grasp. It's the sort of book that demands revisiting the basics; it's easy to forget earlier material, leading to confusion when advanced concepts build upon earlier notations. I anticipate rereading it someday.