Dylan (TM) -- An object-oriented dynamic language
Apple Computer
Eastern Research and Technology
Copyright 1992 Apple Computer, Inc.
Contents:
-
Acknowledgments 5
-
Foreword 7
-
Preface 9
-
1. Introduction 15
-
Background and Goals 15
-
About this Manual 16
-
Manual Notation 16
-
2. Language Overview 19
-
Structure of Dylan 20
-
3. Syntax and Semantics 23
-
Lexical Notation 23
-
Conventions 25
-
Expressions and Programs 27
-
Multiple Values 30
-
4. Variables 31
-
Module Variables 31
-
Lexical Variables 32
-
5. Modules 35
-
Overview of Modules 35
-
References to Module Variables 36
-
Adding Variables to a Module 36
-
Using Modules 36
-
ReadOnly Variables 37
-
6. Introduction to Functions and Classes 39
-
Generic Functions and Methods 39
-
Classes, Instances, and Singletons 48
-
7. Assignment 61
-
8. Conditionals, Flow of Control, and Evaluation 63
-
True and False 63
-
Conditional Execution 63
-
Iteration Constructs 68
-
Simple Exits 71
-
Evaluation 72
-
9. Equality and Magnitude Comparisons 75
-
Equality Comparisons 75
-
Magnitude Comparisons 77
- 10. Functions 79
-
Methods 79
-
Method Dispatch 81
-
Additional Function Details 85
-
Reflective Operations on Functions and Methods 87
-
11. Classes 91
-
Coercing and Copying Objects 91
-
Reflective Operations on Classes 92
-
Sealing Classes 94
-
Slots and Slot Descriptors 94
-
Singletons 96
-
12. Collections 99
-
Functions for Collections 99
-
Functions for Sequences 104
-
The Instantiable Collection Classes 111
-
Operations on Arrays 113
-
Operations on Deques 114
-
Operations on Lists 115
-
Operations on Ranges 118
-
Operations on Stretchy Vectors 119
-
Operations on Strings 119
-
Operations on Tables 120
-
Operations on Vectors 121
-
The Iteration Protocol 122
-
Iteration Stability and Natural Order 123
-
Collection Keys 123
-
Mutability 127
-
Collection Alignment 128
-
Defining a New Collection Class 130
-
13. Conditions 131
-
Background 131
-
Overview 133
-
Specification 136
-
Examples 144
- 14. Numbers 147
-
Automatic Type Conversion 147
-
Numeric Classes 148
-
General Arithmetic Functions 149
-
15. Keywords and Symbols 153
-
16. Characters 155
-
17. Functional Operations 157
-
18. Miscellaneous Operations 161
-
Index 163
Next chapter: Acknowledgments