Flavors
Encyclopedia
Flavors, an early object-oriented
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

 extension to Lisp
Lisp programming language
Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized syntax. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today; only Fortran is older...

 developed by Howard Cannon at the MIT Artificial Intelligence Laboratory for the Lisp machine
Lisp machine
Lisp machines were general-purpose computers designed to efficiently run Lisp as their main software language. In a sense, they were the first commercial single-user workstations...

 and its programming language Lisp Machine Lisp
Lisp Machine Lisp
Lisp Machine Lisp is a dialect of the Lisp programming language, a direct descendant of Maclisp, and was initially developed in the mid to late 1970s as the systems programming language for the MIT Lisp machines. Lisp Machine Lisp was also the Lisp dialect with the most influence on the design of...

, was the first programming language to include mixins. Symbolics
Symbolics
Symbolics refers to two companies: now-defunct computer manufacturer Symbolics, Inc., and a privately held company that acquired the assets of the former company and continues to sell and maintain the Open Genera Lisp system and the Macsyma computer algebra system.The symbolics.com domain was...

 used it for its Lisp machines, and eventually developed it into New Flavors; both the original and new Flavors were message passing
Message passing
Message passing in computer science is a form of communication used in parallel computing, object-oriented programming, and interprocess communication. In this model, processes or objects can send and receive messages to other processes...

 OO models. It was hugely influential in the development of the Common Lisp
Common Lisp
Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 , . From the ANSI Common Lisp standard the Common Lisp HyperSpec has been derived for use with web browsers...

 Object System (CLOS).

Implementations of Flavors are also available for Common Lisp
Common Lisp
Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 , . From the ANSI Common Lisp standard the Common Lisp HyperSpec has been derived for use with web browsers...

.

New Flavors replaced message sending with calling generic function
Generic function
In certain systems for object-oriented programming such as the Common Lisp Object System and Dylan, a generic function is an entity made up of all methods having the same name. Typically a generic function itself is an instance of a class that inherits both from function and standard-object...

s.

Flavors offers :before and :after daemons with the default method combination (called :daemon).

Flavors offers a few features not found in CLOS:
  • Wrappers
  • Automatic lexical access to slots using variables within methods.
  • Internal flavor functions, macros and substs.
  • Automatically generated constructors.
  • DEFFLAVOR options: :required-methods, :abstract-flavor, :mixture.
  • SEND function for sending messages.


CLOS offers the following features not found in Flavors:
  • Multimethods
  • Methods specialized on individual objects (via EQL).
  • Methods specialized on Common Lisp types (symbol, integer, ...).
  • Methods specialized on defstruct types.
  • Class slots.

Terminology

Flavors terminology
Flavors CLOS
flavor class
component flavor superclass
dependent flavor subclass
local component flavor direct superclass
local dependent flavor direct subclass
generic function generic function
combined method effective method
method option method qualifier
instance instance
instance variable slot
ordering of flavor components class precedence list

Further reading

  • "New Flavors", David Moon
    David Moon
    David A. Moon is a programmer and computer scientist, known for his work on the Lisp programming language and being one of the founders of Symbolics.-Projects:* CLOS* MIT* Symbolics, where he developed generational garbage collection algorithms...

    , S Keene - Proceedings of ACM Conf. Object-Oriented Programming, Systems (ACM 1986 OOPSLA Conference), 1986
  • "Object-oriented programming with flavors", David A. Moon. Conference on Object Oriented Programming Systems Languages and Applications 1986, ISSN 0362-1340
  • Flavors, Technical Report, MIT Artificial Intelligence Laboratory, Cambridge (Mass.), 1980
  • Daniel Weinreb and David Moon, [ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-602.pdf Flavors: Message Passing in the Lisp Machine], A.I. Memo No. 602, November 1980, MIT AI Lab
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK