Contents
1. Introduction
1. The Art of Language Design
1.1 Evolution
1.2 Special Purposes
1.3 Personal Preference
2. The Programming Language Spectrum
3. Why Study Programming Languages?
4. Compilation and Interpretation
5. Programming Environments
2. Names, Scopes and Bindings
1. Introduction
2. The Notion of Binding Time
3. Object Lifetime and Storage Management
3.1 Stack Based Allocation
3.2 Heap Based Allocation
3.3 Garbage Collection
4. Scope Rules
4.1 Static Scope
4.2 Dynamic Scope
4.3 Symbol Tables
4.4 Association Lists and Central Reference Tables
5. The Meaning of Names in a Scope
5.1 Aliasing
5.2 Overloading
5.3 Polymorphism and Related Concept
6. The Binding of Referencing Environments
6.1 Subroutine Closures
6.2 First-class Values Unlimited Extend
6.3 Object Closures
7. Macro
3. Control Flow
1. Introduction
2. Expression Evaluation
2.1 Precedence and Associativity
2.2 Assignments
2.3 Ordering with Expressions
2.4 Short Circuit Evaluation
3. Structured and Unstructured Flow
3.1 Structured Alternatives to goto
4. Sequencing
5. Selection
5.1 Short Circuited Conditions
5.2 Case / Switch Statements
6. Iteration
6.1 Enumeration – Controlled Loops
6.2 Combination Loops 17
6.3 Iterators
6.4 Logically Controlled Loops
7. Recursion
7.1 Iteration and Recursion
7.2 Applicative and Normal Order Evaluation
8. Non Determinacy
4. Data Types
1. Introduction
2. Primitive Data Types
2.1 Numeric
2.2 Integer
2.3 Floating Point
2.4 Complex
2.5 Decimal
2.6 Boolean Types
2.7 Character Types
2.8 Character Strings
2.9 User Defined Ordinal Types
3. Array Types
3.1 Design Issues
3.2 Arrays and Indexes
3.3 Subscript Bindings and Array Categories
3.4 Heterogeneous Arrays
3.5 Array Initialization
3.6 Array Operations
3.7 Rectangular and Jagged Array
3.8 Slices
3.9 Evaluation
3.10 Implementation of Array Types
4. Associative Arrays
4.1 Structure and Operations
4.2 Implementing Associative Arrays
5. Record Types
5.1 Definitions of Records
5.2 References to Record Fields
5.3 Operations on Record
5.4 Evaluation
5.5 Implementation of Record Types
6. Union Types
6.1 Design Issues
6.2 Discriminated Union Vs Free Unions
7. Pointer and Reference Types
7.1 Design Issues
7.2 Pointer Operations
7.3 Pointer Problems
7.4 Pointers in C and C++
7.5 Reference Type
7.6 Evaluation
7.7 Implementation of Pointer and Reference Types
7.8 Heap Management
5. Subprograms and Implementing Subprograms
1. Introduction
2. Fundamentals of Subprogram
3. Design Issues for Subprograms
4. Local Referencing Environment
5. Parameter Passing Methods
5.1 Parameter Modes
6. Parameters that are Subprograms
7. Overloaded Subprograms
8. Generic Subprograms
8.1 Generic Functions in C++
8.2 Generic Methods in Java
9. Design Issues for Functions
10. User-Defined Overloaded Operators
11. Coroutines
12. The General Semantics of Calls and Returns
13. Implementing “simple” Subprograms
14. Implementing Subprograms
15. Nested Subprograms
16. Blocks
17. Implementing Dynamic Scoping
6. Data Abstraction and Object Orientation
1. Object-Oriented Programming
2. Encapsulation and Inheritance
2.1 Modules
2.2 Classes
2.3 Nesting (Inner Classes)
2.4 Extending without Inheritance
2.5 Type Extensions
3. Initialization and Finalization
3.1 Choosing a Constructor
3.2 References and Values
3.3 Execution Order
3.4 Garbage Collection
4. Dynamic Method Binding
4.1 Virtual and Non-virtual Methods
4.2 Abstract Classes
4.3 Member Lookup
4.4 Polymorphism
5. Multiple Inheritance
5.1 Semantic Ambiguities
5.2 Replicated Inheritance
5.3 Shared Inheritance
5.4 Mix-in Inheritance
6. Fragile Base Class Problem
7. Concurrency
1. Introduction
1.1 Multiprocessor Architectures
1.2 Categories of Concurrency
1.3 Motivations for Studying Concurrency
2. Introduction to Subprogram-Level Concurrency
2.1 Fundamental
2.2 Language Design for Concurrency
2.3 Design Issues
3. Semaphores
3.1 Introduction
3.2 Cooperation Synchronization
3.3 Competition Synchronization
3.4 Evaluation
4. Monitors
4.1 Introduction
4.2 Competition Synchronization
4.3 Cooperative Synchronization
4.4 Evaluation of Monitors
5. Message Passing
5.1 Introduction
5.2 Concept of Synchronous Message Passing
6. Java Threads
6.1 The Thread class
6.2 Priorities
6.3 Competition Synchronization
6.4 Cooperation Synchronization
6.5 Evaluation
8. Functional Programming in Scala
1. The Scala Programming Language
1.1 val variables and var variables
2. Data Types
3. Executing Scala Code
4. Terminal Input and Output
5. Strings
6. Numbers
7. Control Structures
7.1 Scala Control Structures
8. Function
9. Classes and Properties
9.1 Primary Constructor
9.2 Visibility of Constructor Fields
10. Methods
10.1 Declaring Methods
10.2 Controlling Method Scope
10.3 Calling a Method on a Superclass
10.4 Using Parameter Names When Calling a Method
10.5 Defining a Method That Returns Multiple Items (Tuples)
10.6 Declaring That a Method Can Throw an Exception
11. Object
12. Functional Programming
12.1 Using Function Literals (Anonymous Functions)
12.2 Using Functions as Variables
12.3 Defining a Method That Accepts a Simple Function Parameter
12.4 More Complex Functions
12.5 Using Closures
12.6 Partially Applied Functions
12.7 Creating a Function That Returns a Function
13. List, Array, Map, Set
13.1 List
13.2 Arrays
13.3 Map
13.4 Set