| |
| |
Preface | |
| |
| |
Acknowledgments | |
| |
| |
| |
Programming Languages | |
| |
| |
| |
The Amazing Variety | |
| |
| |
| |
The Odd Controversies | |
| |
| |
| |
The Intriguing Evolution | |
| |
| |
| |
The Many Connections | |
| |
| |
| |
A Word about Application Programming Interfaces | |
| |
| |
| |
Defining Program Syntax | |
| |
| |
| |
A Grammar Example for English | |
| |
| |
| |
A Grammar Example for a Programming Language | |
| |
| |
| |
A Definition of Grammars: Backus-Naur Form | |
| |
| |
| |
Writing Grammars | |
| |
| |
| |
Lexical Structure and Phrase Structure | |
| |
| |
| |
Other Grammar Forms | |
| |
| |
| |
Where Syntax Meets Semantics | |
| |
| |
| |
Operators | |
| |
| |
| |
Precedence | |
| |
| |
| |
Associativity | |
| |
| |
| |
Other Ambiguities | |
| |
| |
| |
Cluttered Grammars | |
| |
| |
| |
Parse Trees and EBNF | |
| |
| |
| |
Abstract Syntax Trees | |
| |
| |
| |
Language Systems | |
| |
| |
| |
The Classical Sequence | |
| |
| |
| |
Variations on the Classical Sequence | |
| |
| |
| |
Binding Times | |
| |
| |
| |
Debuggers | |
| |
| |
| |
Runtime Support | |
| |
| |
| |
A First Look at ML | |
| |
| |
| |
Getting Started with an ML Language System | |
| |
| |
| |
Constants | |
| |
| |
| |
Operators | |
| |
| |
| |
Conditional Expressions | |
| |
| |
| |
Type Conversion and Function Application | |
| |
| |
| |
Variable Definition | |
| |
| |
| |
Garbage Collection | |
| |
| |
| |
Tuples and Lists | |
| |
| |
| |
Function Definitions | |
| |
| |
| |
ML Types and Type Annotations | |
| |
| |
| |
Types | |
| |
| |
| |
A Menagerie of Types | |
| |
| |
| |
Uses for Types | |
| |
| |
| |
A Second Look at ML | |
| |
| |
| |
Patterns You Already Know | |
| |
| |
| |
More Simple Patterns | |
| |
| |
| |
Complex Patterns | |
| |
| |
| |
A Summary of ML Patterns So Far | |
| |
| |
| |
Using Multiple Patterns for Functions | |
| |
| |
| |
Pattern-Matching Style | |
| |
| |
| |
Local Variable Definitions | |
| |
| |
| |
Nested Function Definitions | |
| |
| |
| |
Polymorphism | |
| |
| |
| |
Overloading | |
| |
| |
| |
Parameter Coercion | |
| |
| |
| |
Parametric Polymorphism | |
| |
| |
| |
Subtype Polymorphism | |
| |
| |
| |
A Third Look at ML | |
| |
| |
| |
More Pattern Matching | |
| |
| |
| |
Function Values and Anonymous Functions | |
| |
| |
| |
Higher-Order Functions and Currying | |
| |
| |
| |
Predefined Higher-Order Functions | |
| |
| |
| |
Scope | |
| |
| |
| |
Definitions and Scope | |
| |
| |
| |
Scoping with Blocks | |
| |
| |
| |
Scoping with Labeled Namespaces | |
| |
| |
| |
Scoping with Primitive Namespaces | |
| |
| |
| |
Dynamic Scoping | |
| |
| |
| |
A Word about Separate Compilation | |
| |
| |
| |
A Fourth Look at ML | |
| |
| |
| |
Enumerations | |
| |
| |
| |
Data Constructors with Parameters | |
| |
| |
| |
Type Constructors with Parameters | |
| |
| |
| |
Recursively-Defined Type Constructors | |
| |
| |
| |
Memory Locations for Variables | |
| |
| |
| |
Activation-Specific Variables | |
| |
| |
| |
Activation Records | |
| |
| |
| |
Static Allocation of Activation Records | |
| |
| |
| |
Dynamic Stacks of Activation Records | |
| |
| |
| |
Handling Nested Function Definitions | |
| |
| |
| |
Functions as Parameters | |
| |
| |
| |
Long-Lived Functions | |
| |
| |
| |
A First Look at Java | |
| |
| |
| |
Thinking about Objects | |
| |
| |
| |
Simple Expressions and Statements | |
| |
| |
| |
Class Definitions | |
| |
| |
| |
About References and Pointers | |
| |
| |
| |
Getting Started with a Java Language System | |
| |
| |
| |
Memory Management | |
| |
| |
| |
A Memory Model Using Java Arrays | |
| |
| |
| |
Stacks | |
| |
| |
| |
Heaps | |
| |
| |
| |
Current Heap Links | |
| |
| |
| |
A Second Look at Java | |
| |
| |
| |
Implementing Interfaces | |
| |
| |
| |
Extending Classes | |
| |
| |
| |
Extending and Implementing | |
| |
| |
| |
Multiple Inheritance and How to Live without It | |
| |
| |
| |
Generics and How to Live without Them | |
| |
| |
| |
Object Orientation | |
| |
| |
| |
Object-Oriented Programming | |
| |
| |
| |
A Menagerie of Object-Oriented Language Features | |
| |
| |
| |
A Third Look at Java | |
| |
| |
| |
Throwable Classes | |
| |
| |
| |
Catching Exceptions | |
| |
| |
| |
Throwing Exceptions | |
| |
| |
| |
Checked Exceptions | |
| |
| |
| |
Error Handling | |
| |
| |
| |
Finally | |
| |
| |
| |
Parameters | |
| |
| |
| |
Correspondence | |
| |
| |
| |
By Value | |
| |
| |
| |
By Result | |
| |
| |
| |
By Value-Result | |
| |
| |
| |
By Reference | |
| |
| |
| |
By Macro Expansion | |
| |
| |
| |
By Name | |
| |
| |
| |
By Need | |
| |
| |
| |
Specification Issues | |
| |
| |
| |
A First Look at Prolog | |
| |
| |
| |
The Building Blocks--Prolog Terms | |
| |
| |
| |
Getting Started with a Prolog Language System | |
| |
| |
| |
Rules | |
| |
| |
| |
The Two Faces of Prolog | |
| |
| |
| |
A Word about Term Interpretation | |
| |
| |
| |
Operators | |
| |
| |
| |
Lists | |
| |
| |
| |
Negation and Failure | |
| |
| |
| |
What Prolog Is Good For | |
| |
| |
| |
A Second Look at Prolog | |
| |
| |
| |
Unification | |
| |
| |
| |
A Procedural View | |
| |
| |
| |
An Implementational View | |
| |
| |
| |
An Abstract View--Proof Trees | |
| |
| |
| |
The Lighter Side of Prolog | |
| |
| |
| |
Cost Models | |
| |
| |
| |
A Cost Model for Lists | |
| |
| |
| |
A Cost Model for Function Calls | |
| |
| |
| |
A Cost Model for Prolog Search | |
| |
| |
| |
A Cost Model for Arrays | |
| |
| |
| |
Spurious Cost Models | |
| |
| |
| |
A Third Look at Prolog | |
| |
| |
| |
Numeric Computation | |
| |
| |
| |
Problem Space Search | |
| |
| |
| |
Formal Semantics | |
| |
| |
| |
Language One | |
| |
| |
| |
Language Two--Adding Variables | |
| |
| |
| |
Language Three--Adding Functions | |
| |
| |
| |
Other Kinds of Formal Semantics | |
| |
| |
| |
The History of Programming Languages | |
| |
| |
| |
The Prehistory of Programming | |
| |
| |
| |
Early Programming Languages | |
| |
| |
| |
This Book's Languages | |
| |
| |
Postscript | |
| |
| |
Index | |