Next: net channels, Previous: tracing, Up: Top [Index]
In the context of the library (vicare language-extensions
multimethods)
: generic functions, or multimethods, are
interfaces to procedures that can be specialised to the (possibly
conventional) data types of their arguments; each specialisation of a
generic function is called method. When applying a generic
function to a tuple of arguments, the most specific method with respect
to the arguments’ types is chosen.
The library defines two kinds of generic functions: ordinary and starred. Ordinary generic functions only have one (primary) method for each possible tuple of argument types. Starred generic functions may have qualified primary, before, after and around methods for each possible tuple of argument types; the methods are applied (composed) according to a defined protocol.
Multimethods are meant to be used with the typed language.
• multimethods examples: | Examples of method dispatching. | |
• multimethods application: | How generic functions and methods are invoked. | |
• multimethods dispatching: | How methods are dispatched. | |
• multimethods definers: | Declaring multimethod definers. | |
• multimethods defining: | Built-in multimethod definers. | |
• multimethods methods: | Adding methods to a multimethod. | |
• multimethods next: | Invoking the next method. | |
• multimethods predefined: | Predefined multimethods. |