Common Lisp Object System (CLOS)
Common Lisp includes a toolkit for object-oriented programming, the Common Lisp Object System or CLOS, which is one of the most powerful object systems available in any language. For example Peter Norvig explains how many Design Patterns are simpler to implement in a dynamic language with the features of CLOS (Multiple Inheritance, Mixins, Multimethods, Metaclasses, Method combinations, etc.). Several extensions to Common Lisp for object-oriented programming have been proposed to be included into the ANSI Common Lisp standard, but eventually CLOS was adopted as the standard object-system for Common Lisp. CLOS is a dynamic object system with multiple dispatch and multiple inheritance, and differs radically from the OOP facilities found in static languages such as C++ or Java. As a dynamic object system, CLOS allows changes at runtime to generic functions and classes. Methods can be added and removed, classes can be added and redefined, objects can be updated for class changes and the class of objects can be changed.
CLOS has been integrated into ANSI Common Lisp. Generic Functions can be used like normal functions and are a first-class data type. Every CLOS class is integrated into the Common Lisp type system. Many Common Lisp types have a corresponding class. There is more potential use of CLOS for Common Lisp. The specification does not say whether conditions are implemented with CLOS. Pathnames and streams could be implemented with CLOS. These further usage possibilities of CLOS for ANSI Common Lisp are not part of the standard. Actual Common Lisp implementations are using CLOS for pathnames, streams, input/output, conditions, the implementation of CLOS itself and more.
Read more about this topic: Common Lisp
Famous quotes containing the words common, lisp, object and/or system:
“It is to be presumed, that a man of common sense, who does not desire to please, desires nothing at all; since he must know that he cannot obtain anything without it.”
—Philip Dormer Stanhope, 4th Earl Chesterfield (16941773)
“Taught me my alphabet to say,
To lisp my very earliest word,”
—Edgar Allan Poe (18091849)
“I consider, then, the power to annul a law of the United States, assumed by one state, incompatible with the existence of the Union, contradicted expressly by the letter of the Constitution, unauthorized by its spirit, inconsistent with every principle on which it was founded, and destructive of the great object for which it was formed.”
—Andrew Jackson (17671845)
“You and I ... are convinced of the fact that if our Government in Washington and in a majority of the States should revert to the control of those who frankly put property ahead of human beings instead of working for human beings under a system of government which recognizes property, the nation as a whole would again be in a bad situation.”
—Franklin D. Roosevelt (18821945)