This book will be useful to anyone learning dynamic, object-oriented programming, whether it be in Dylan, Java, Smalltalk, or Lisp.Dylan is a new programming language invented by Apple Computer and developed with Harlequin and other partners. The language is both object-oriented, like C++ and Java, and dynamic, like Smalltalk. Dylan is designed to deliver applications that run efficiently on a wide range of platforms. It also facilitates the rapid development and incremental refinement of prototype programs. Dylan is a good choice for any application, but you will find it particularly useful for complex object-oriented programs, and for programs that may need to be changed "on the fly."- Andrew Shalit, author of The Dylan Reference Manual
Public-domain implementations of Dylan are available for most popular computer systems. Harlequin has developed the first complete, commercial implementation of the language--including both compiler and development environment.
You will learn here the benefits of dynamic, object-oriented programming, and how to write practical Dylan programs.
Dylan Programming gets you started quickly, with a simple but complete program that lets you experiment with the language. It then leads you progressively through the development of a sample application, illustrating advanced topics such as macros, modules, libraries, inher itance, performance, and exceptions. This book is appropriate for any Dylan implementation. It assumes that you can program in some conventional language, but requires no prior knowledge of object-oriented or dynamic techniques.
The authors have all worked on Harlequin's Dylan product. Neal Feinberg manages the development of Harlequin's database technology. Sonya E. Keene, author of Object-Oriented Programming in COMMON LISP, publishes large documents on the World Wide Web. Robert O. Mathews was previously the OSF documentation project leader for Motif and DCE. P. Tucker Withington designs and develops automatic memory-management facilities for Dylan.
Harlequin--The Late-Binding Companyo--is a 10-year-old, independent software firm specializing in symbolic processing, electronic publishing, World Wide Web, and intelligence analysis. Harlequin has offices in the United States, the United Kingdom, and Australia.
0201479761B04062001
Preface.
I. Basic Concepts.
1. Introduction. II. Intermediate Topics. III. Sample Application. IV. Advanced Topics.
Comparison of Dylan and Other Programming Languages.
Modular, Reusable, Component-Oriented Programs.
Powerful and Familiar Procedural Programming.
Rapid and Productive Development of Programs.
Delivery of Sale, Efficient, Compact Applications.
2. Quick Start.
Dialog With a Dylan Listener.
Simple Arithmetic Operations.
Variables and Constants.
Formatted Output.
A Complete Dylan Program.
3. Methods, Classes, and Objects.
Method Definitions.
Classes.
Objects.
4. User-Defined Classes and Methods.
Requirement of the Time and Position Classes and Methods.
User-Defined Classes.
Use of Make to Create an Instance.
Getters and Setters of Slot Values.
Initialization of Slots When Instances Are Made.
Methods for Handling Time.
5. Class Inheritance.
The
Class Inheritance.
Methods for Classes That Use Inheritance.
Redefinition of a Method.
Method Dispatch.
Definition of a Generic Function.
Use of Next-Method to Call Another Method.
The Time Library (So Far).
6. Multimethods.
Methods for the + Generic Function.
Method Dispatch for Multimethods.
Methods for Comparison of Times.
7. Modularity.
Requirements of the Position Classes.
Initial Class Definitions.
Abstract Classes.
Absolute Position.
Relative Position.
Meeting of Angles and Times.
Abstract, Concrete, and Instantiable Classes.
8. A Simple Library.
The LID File.
The Library File.
The Implementation File.
The Test File.
9. Nonclass Types.
Functions That Create Nonclass Types.
Examples of Types That Are Not Classes.
Method Dispatch and Nonclass Types.
10. Slots.
Dot-Syntax Abbreviation for Simple Function Calls.
Getters and Setters for Slots.
Initialize Methods.
Slot Options for Initialization of Slots.
Allocation of Slots.
Virtual Slots.
11. Collections and Control Flow.
Built-In Collection Classes.
Basic Use of Collections.
Iterations Over a Sequence.
Manipulation of Collections.
Conditional Execution.
12. Functions.
Function-Calling Syntax.
The Function-Calling Protocol.
Functions as Objects.
13. Libraries and Modules.
Libraries.
Modules.
Source Code, Modules, and Libraries.
Module Definition.
Library Definition.
Interchange Files.
The Time-Library File.
Component Library.
Protocol Design.
14. Four Complete Libraries.
The Sixty-Unit Library.
The Say Library.
The Time Library.
The Angle Library.
15. Design of the Airport Application.
Goals of the Airport Application.
Objects That Model an Airport.
Behaviors of the Objects.
The Vehicle-Container Protocol.
Sorted Sequences.
Testing.
16. Definition of a New Collection.
The Sorted-Sequence.Dylan File.
The Sorted-Sequence-Library.Dylan File.
The Sorted-Sequence.Lid File.
17. The Airport Application.
The Definitions.Dylan File.
The Airport-Classes.Dylan File.
The Vehicle-Dynamics.Dylan File.
The Schedule.Dylan File.
The Airport-Test.Dylan File.
The Definitions-Library.Dylan File.
The Definitions.Lid File.
The Airport-Library.Dylan File.
The Airport.Lid File.
The Airport-Test-Library.Dylan File.
The Airport-Test.Lid File.
18. Multiple Inheritance.
Example of Multiple Inheritance.
Multiple Inheritance and Slots.
The Class Precedence List.
Multiple Inheritance and Method Dispatch.
Use of Multiple Inheritance.
19. Performance and Flexibility.
Execution Model.
Efficiency Model.
Type Constraints.
Limited Types.
Enumerations.
Limited Types.
Enumerations.
Direct Methods.
Tail Calls.
Typed Generic Functions.
Open Generic Functions.
Open Classes.
Sealed Domains.
Slot Accessors.
Primary Classes.
Additional Efficiency Information.
20. Exceptions.
An Informal Exception Protocol.
A Simple Dylan Exception Protocol.
Additional Exception Mechanisms.
Protected Operations and the Block Construct.
21. Macros.
Patterns and Templates.
Macro Hygiene.
Evaluation in Macros.
Constraints.
More Complex Rules.
More Hygiene.
Auxiliary Macros.
Appendix A. Resource on Dylan.
Appendix B. Dylan Object Model for C and C++ Programmers.
Glossary.
Index. 0201479761T04062001
