Generated by DeepSeek V3.2| CLOS | |
|---|---|
| Name | CLOS |
| Paradigm | Object-oriented programming, Multi-paradigm programming language |
| Designer | Daniel G. Bobrow, Linda G. DeMichiel, Richard P. Gabriel, David A. Moon, Gregor Kiczales |
| Developer | Xerox PARC, Symbolics, X3J13 |
| Typing | Dynamic typing, Strong typing |
| Influenced by | Flavors (programming language), CommonLoops, New Flavors |
| Influenced | Dylan (programming language), Julia (programming language), Goo (programming language) |
| Operating system | Cross-platform |
CLOS. The Common Lisp Object System is the standard object-oriented programming facility for the Common Lisp language, integrated directly into the language's syntax and semantics. It provides a powerful and flexible Metaobject Protocol that allows programmers to customize the object system's behavior itself. Developed through a collaboration between major Lisp machine companies and researchers, it was formally adopted as part of the ANSI standard for Common Lisp.
CLOS is fundamentally integrated into Common Lisp, unlike the C++ or Java (programming language) models where object orientation is a primary paradigm. It supports a Multiple inheritance model and uses Generic functions rather than Message passing as its core dispatch mechanism. This design allows methods to be defined independently of Class (computer programming) and promotes a more functional style. The system is renowned for its Metaobject Protocol, which exposes the internal machinery of the object system for advanced customization, influencing later languages like Dylan (programming language) and aspects of Julia (programming language).
A central feature is the use of Generic functions, which are functions whose behavior is specialized based on the classes of their arguments. Methods are defined for these generic functions using **defmethod**, and method combination is controlled by declarative Method combination qualifiers like **:before**, **:after**, and **:around**. The system supports a sophisticated Multiple inheritance mechanism with a deterministic Class precedence list for resolving method selection. The Metaobject Protocol provides programmable interfaces for Metaclasses, Slot (computer programming) access, and method invocation, enabling developers to create domain-specific object behaviors. Other advanced features include Multimethods for dispatching on all arguments and a declarative system for defining Class (computer programming) structures with **defclass**.
As part of the ANSI standard, CLOS is implemented in all conforming Common Lisp implementations, such as Steel Bank Common Lisp, Clozure CL, Allegro Common Lisp, and LispWorks. Some implementations, historically from Symbolics and Xerox PARC, contributed to its early evolution. Prior influential object systems for Lisp that informed its design include Flavors (programming language) from the MIT Artificial Intelligence Laboratory and CommonLoops from Xerox PARC. The X3J13 standards committee was instrumental in its final specification. While CLOS is specific to Common Lisp, its concepts have been adapted in other Lisp-family languages and inspired the design of Goo (programming language).
Unlike the Smalltalk or Java (programming language) model which uses Message passing to a receiver object, CLOS decouples methods from classes via Generic functions. Its Multiple inheritance model is more explicit and flexible than the single inheritance of Java (programming language) or the Mixin-based approach of Ruby (programming language). The Metaobject Protocol offers a level of extensibility absent in mainstream systems like C++ or Objective-C. While similar to Multimethods in Dylan (programming language), CLOS is more tightly woven into the Lisp macro and condition system. Its approach contrasts with the prototype-based model of JavaScript or the Actor model in languages like Erlang (programming language).
The development of CLOS was a consolidation effort in the late 1980s to unify the fragmented Lisp community after the AI winter. Key predecessor systems were Flavors (programming language) from Symbolics and CommonLoops from Xerox PARC, with New Flavors also being a significant influence. A design committee including Daniel G. Bobrow, Gregor Kiczales, David A. Moon, Linda G. DeMichiel, and Richard P. Gabriel synthesized these approaches. The specification was refined by the X3J13 standards committee and ultimately ratified as part of the ANSI Common Lisp standard. Its development showcased a unique collaboration between commercial entities like Symbolics, Texas Instruments, and Xerox PARC, and its design philosophy has had a lasting impact on programming language research. Category:Common Lisp Category:Object-oriented programming languages Category:Programming languages created in the 1980s