CLOS


CLOS, pronounced either as 'klahss' or 'see lohs,' stands for the Common Lisp Object System. It is a class hierarchy & generic type dispatch framework in the Common Lisp standard, derived from the older Flavors? and LOOPS. The main characteristic of CLOS's type dispatch, as opposed to that of other object-systems such as Simula's and Smalltalk's, is that generic functions dispatch on the classes of all of their arguments, not just the first one; methods are associated with generic functions by sequences of argument classes, rather than being associated with classes. Many CLOS implementations and derivatives also provide a meta-object-protocol.

There are a number of introductions to CLOS, including A Brief Guide to CLOS.

There are a number of library frameworks based on CLOS for Scheme. The two main ones are Meroon? and Tiny-CLOS. Meroon is Christian Queinnec's library for a CLOS-style class hierarchy & generic function system, designed for compilers to optimize easily by being much more static & syntactic than other similar systems. Tiny-CLOS is a simple but complete implementation of a meta-object-protocol with a CLOS-style class hierarchy & generic function system. There are many derivatives of Tiny-CLOS, including Eli Barzilay's Swindle for PLT-Scheme, Chris Hanson's SOS for MIT-Scheme?, much of Gauche's infrastructure, and STklos.


category-object-oriented