Object-Oriented Programming in Common Lisp: A Programmer's Guide to CLOS

Last updated

Object-Oriented Programming in Common Lisp: A Programmer's Guide to CLOS (1988, Addison-Wesley, ISBN   0-201-17589-4) is a book by Sonya Keene on the Common Lisp Object System. Published first in 1988, the book starts out with the elements of CLOS and develops through the concepts of data abstraction with classes and methods, inheritance, and genericity towards creating an advanced CLOS program using streams I/O. The book's brief table of contents is given below.

Addison-Wesley publisher

Addison-Wesley is a publisher of textbooks and computer literature. It is an imprint of Pearson PLC, a global publishing and education company. In addition to publishing books, Addison-Wesley also distributes its technical titles through the Safari Books Online e-reference service. Addison-Wesley's majority of sales derive from the United States (55%) and Europe (22%).

International Standard Book Number Unique numeric book identifier

The International Standard Book Number (ISBN) is a numeric commercial book identifier which is intended to be unique. Publishers purchase ISBNs from an affiliate of the International ISBN Agency.

Table of Contents

1. Introduction to CLOS Model
2. Elements of CLOS Programs
3. Developing a simple CLOS Program: Locks
4. Programming with Methods
5. Controlling the Generic Dispatch
6. Class Inheritance
7. Defining CLOS Elements
8. Redefining CLOS Elements
9. Creating and Initializing Instances
10. Procedural Definition: Initialization
11. Developing an Advanced CLOS Program: Streams
12. Highlights of CLOS

Appendix A Glossary of CLOS Terminology
Appendix B Syntax of CLOS Operators
Appendix C CLOS Operators Not Documented in This Book

Bibliography
Index


Related Research Articles

Common Lisp (CL) is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 (R2004). The Common Lisp HyperSpec, a hyperlinked HTML version, has been derived from the ANSI Common Lisp standard.

In object-oriented programming, a class is an extensible program-code-template for creating objects, providing initial values for state and implementations of behavior. In many languages, the class name is used as the name for the class, the name for the default constructor of the class, and as the type of objects generated by instantiating the class; these distinct concepts are easily conflated.

Dylan (programming language) multi-paradigm programming language

Dylan is a multi-paradigm programming language that includes support for functional and object-oriented programming (OOP), and is dynamic and reflective while providing a programming model designed to support generating efficient machine code, including fine-grained control over dynamic and static behaviors. It was created in the early 1990s by a group led by Apple Computer.

Lisp (programming language) Programming language

Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized prefix notation. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today. Only Fortran is older, by one year. Lisp has changed since its early days, and many dialects have existed over its history. Today, the best known general-purpose Lisp dialects are Clojure, Common Lisp, and Scheme.

Multiple inheritance is a feature of some object-oriented computer programming languages in which an object or class can inherit characteristics and features from more than one parent object or parent class. It is distinct from single inheritance, where an object or class may only inherit from one particular object or class.

In computer science, an object can be a variable, a data structure, a function, or a method, and as such, is a value in memory referenced by an identifier.

The Common Lisp Object System (CLOS) is the facility for object-oriented programming which is part of ANSI Common Lisp. CLOS is a powerful dynamic object system which differs radically from the OOP facilities found in more static languages such as C++ or Java. CLOS was inspired by earlier Lisp object systems such as MIT Flavors and CommonLoops, although it is more general than either. Originally proposed as an add-on, CLOS was adopted as part of the ANSI standard for Common Lisp and has been adapted into other Lisp dialects such as EuLisp or Emacs Lisp.

In computer programming, a generic function is a function defined for polymorphism.

Programming languages can be grouped by the number and types of paradigms supported.

A method in object-oriented programming (OOP) is a procedure associated with a message and an object. An object consists of data and behavior. The data and behavior comprise an interface, which specifies how the object may be utilized by any of various consumers of the object.

Dynamic programming language, in computer science, is a class of high-level programming languages which, at runtime, execute many common programming behaviors that static programming languages perform during compilation. These behaviors could include extension of the program, by adding new code, by extending objects and definitions, or by modifying the type system. Although similar behaviours can be emulated in nearly any language, with varying degrees of difficulty, complexity and performance costs, dynamic languages provide direct tools to make use of them. Many of these features were first implemented as native features in the Lisp programming language.

In object-oriented programming languages, a mixin is a class that contains methods for use by other classes without having to be the parent class of those other classes. How those other classes gain access to the mixin's methods depends on the language. Mixins are sometimes described as being "included" rather than "inherited".

In computer programming, a function object is a construct allowing an object to be invoked or called as if it were an ordinary function, usually with the same syntax. Function objects are often called functors.

In computer science, a metaobject is an object that manipulates, creates, describes, or implements objects. The object that the metaobject pertains to is called the base object. Some information that a metaobject might define includes the base object's type, interface, class, methods, attributes, parse tree, etc. Metaobjects are examples of the computer science concept of reflection, where a system has access to its own internal structure. Reflection enables a system to essentially rewrite itself on the fly, to alter its own implementation as it executes.

Flavors, an early object-oriented extension to Lisp developed by Howard Cannon at the MIT Artificial Intelligence Laboratory for the Lisp machine and its programming language Lisp Machine Lisp, was the first programming language to include mixins. Symbolics used it for its Lisp machines, and eventually developed it into New Flavors; both the original and new Flavors were message passing OO models. It was hugely influential in the development of the Common Lisp Object System (CLOS).

EuLisp statically and dynamically scoped Lisp dialect

EuLisp is a statically and dynamically scoped Lisp dialect developed by a loose formation of industrial and academic Lisp users and developers from around Europe. The standardizers intended to create a new Lisp "less encumbered by the past", and not so minimalist as Scheme. Another objective was to integrate the object-oriented programming paradigm well. It is a third-generation programming language.

Common Lisp Interface Manager

The Common Lisp Interface Manager (CLIM) is a Common Lisp-based programming interface for creating user interfaces—i.e., GUIs. It is a completely object-oriented User Interface Management System, using the Common Lisp Object System and is based on the idea of stream input and output. There are also facilities for output device independence. It is descended from the GUI system Dynamic Windows of Symbolics's Lisp machines Main development was between 1988 and 1993. CLIM 2.0 was released in 1993.

CommonLoops is an early programming language which extended Common Lisp to include Object-oriented programming functionality and is a dynamic object system which differs from the OOP facilities found in static languages such as C++ or Java. Like New Flavors, CommonLoops supported multiple inheritance, generic functions and method combination. CommonLoops also supported multi-methods and made use of metaobjects. CommonLoops and New Flavors were the primary ancestors of CLOS. CommonLoops was supported by a portable implementation known as Portable CommonLoops (PCL) which ran on all Common Lisp implementations of the day.

This article describes the syntax of the C# programming language. The features described are compatible with .NET Framework and Mono.

Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data, in the form of fields, and code, in the form of procedures. A feature of objects is an object's procedures that can access and often modify the data fields of the object with which they are associated. In OOP, computer programs are designed by making them out of objects that interact with one another. OOP languages are diverse, but the most popular ones are class-based, meaning that objects are instances of classes, which also determine their types.