Generic function: Difference between revisions

Content deleted Content added
wikifying
No edit summary
Tags: Mobile edit Mobile app edit
Line 2:
In certain systems for [[object-oriented programming]] such as the [[CLOS|Common Lisp Object System]]<ref>[http://www.dreamsongs.com/Files/ECOOP.pdf The Common Lisp Object System: An Overview]</ref> and [[Dylan programming language|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 [[Inheritance (object-oriented programming)|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 (programming language)|Flavors]] is one of the early object-oriented programming extensions to Lisp. It used the usual message sending paradigm influenced by [[Smalltalk]]. The syntax for sending a message in Flavors is:
 
<source lang="lisp">