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. Thus generic functions are both functions (that can be called with and applied to arguments) and ordinary objects. The book The Art of the Metaobject Protocol explains the implementation and usage of CLOS generic functions in detail.

Flavors is one of the early object-oriented extensions to Lisp. It used the usual message sending paradigm influenced by Smalltalk. The syntax for sending a message in Flavors is:

(send object :message)

With New Flavors it was decided the message should be a real function and the usual function calling syntax should be used:

(message object)

message now is a generic function, an object and function in its own right. Individual implementations of the message are called methods.

The same idea was implemented in CommonLoops. New Flavors and CommonLoops were the main influence for the Common Lisp Object System.

Read more about Generic Function:  Comparison To Other Languages

Famous quotes containing the words generic and/or function:

    “Mother” has always been a generic term synonymous with love, devotion, and sacrifice. There’s always been something mystical and reverent about them. They’re the Walter Cronkites of the human race . . . infallible, virtuous, without flaws and conceived without original sin, with no room for ambivalence.
    Erma Bombeck (20th century)

    The intension of a proposition comprises whatever the proposition entails: and it includes nothing else.... The connotation or intension of a function comprises all that attribution of this predicate to anything entails as also predicable to that thing.
    Clarence Lewis (1883–1964)