Global Information Lookup Global Information

Dynamic dispatch information


In computer science, dynamic dispatch is the process of selecting which implementation of a polymorphic operation (method or function) to call at run time. It is commonly employed in, and considered a prime characteristic of, object-oriented programming (OOP) languages and systems.[1]

Object-oriented systems model a problem as a set of interacting objects that enact operations referred to by name. Polymorphism is the phenomenon wherein somewhat interchangeable objects each expose an operation of the same name but possibly differing in behavior. As an example, a File object and a Database object both have a StoreRecord method that can be used to write a personnel record to storage. Their implementations differ. A program holds a reference to an object which may be either a File object or a Database object. Which it is may have been determined by a run-time setting, and at this stage, the program may not know or care which. When the program calls StoreRecord on the object, something needs to choose which behavior gets enacted. If one thinks of OOP as sending messages to objects, then in this example the program sends a StoreRecord message to an object of unknown type, leaving it to the run-time support system to dispatch the message to the right object. The object enacts whichever behavior it implements.[2]

Dynamic dispatch contrasts with static dispatch, in which the implementation of a polymorphic operation is selected at compile time. The purpose of dynamic dispatch is to defer the selection of an appropriate implementation until the run time type of a parameter (or multiple parameters) is known.

Dynamic dispatch is different from late binding (also known as dynamic binding). Name binding associates a name with an operation. A polymorphic operation has several implementations, all associated with the same name. Bindings can be made at compile time or (with late binding) at run time. With dynamic dispatch, one particular implementation of an operation is chosen at run time. While dynamic dispatch does not imply late binding, late binding does imply dynamic dispatch, since the implementation of a late-bound operation is not known until run time.[citation needed]

  1. ^ Cite error: The named reference Milton-Schmidt_1994 was invoked but never defined (see the help page).
  2. ^ Cite error: The named reference Driesen-Hoelzle-Vitek_1995 was invoked but never defined (see the help page).

and 19 Related for: Dynamic dispatch information

Request time (Page generated in 0.808 seconds.)

Dynamic dispatch

Last Update:

In computer science, dynamic dispatch is the process of selecting which implementation of a polymorphic operation (method or function) to call at run time...

Word Count : 2611

Multiple dispatch

Last Update:

Multiple dispatch or multimethods is a feature of some programming languages in which a function or method can be dynamically dispatched based on the...

Word Count : 5881

Static dispatch

Last Update:

with dynamic dispatch, which is based on runtime information (such as vtable pointers and other forms of run time type information). Static dispatch is...

Word Count : 240

Double dispatch

Last Update:

function call in the code depends on the dynamic type of a single object and therefore they are known as single dispatch calls, or simply virtual function calls...

Word Count : 4333

Virtual method table

Last Update:

virtual call table, dispatch table, vtable, or vftable is a mechanism used in a programming language to support dynamic dispatch (or run-time method binding)...

Word Count : 1944

Dispatch

Last Update:

community in the US Dispatch (logistics), a procedure in logistics Dynamic dispatch, a computer-programming technique Dispatched labor, an employment...

Word Count : 279

Comparison of programming paradigms

Last Update:

subroutine call, but with three added overheads: dynamic memory allocation, parameter copying, and dynamic dispatch. Obtaining memory from the heap and copying...

Word Count : 2594

Type system

Last Update:

This runtime type information (RTTI) can also be used to implement dynamic dispatch, late binding, downcasting, reflective programming (reflection), and...

Word Count : 7252

Virtual function

Last Update:

method is an inheritable and overridable function or method that is dispatched dynamically. Virtual functions are an important part of (runtime) polymorphism...

Word Count : 1653

Programming language

Last Update:

language to support object-oriented programming (including subtypes, dynamic dispatch, and inheritance), also descends from ALGOL and achieved commercial...

Word Count : 8516

Fragile base class

Last Update:

recursion (dynamic dispatch of methods on this), with the suggestion that invoking methods on this default to closed recursion (static dispatch, early binding)...

Word Count : 738

Function overloading

Last Update:

(computer science) Constructor (computer science) Default argument Dynamic dispatch Factory method pattern Method signature Method overriding Object-oriented...

Word Count : 1427

Late binding

Last Update:

binding in Java programming as a synonym for dynamic dispatch. Specifically, this refers to Java's single dispatch mechanism used with virtual methods. Finally...

Word Count : 1587

Operator overloading

Last Update:

Generic function Generic programming Subtyping Virtual function Single and dynamic dispatch Double dispatch Multiple dispatch Predicate dispatch v t e...

Word Count : 1775

Call site

Last Update:

(line of code) where the function is called (or may be called, through dynamic dispatch). A call site is where zero or more arguments are passed to the function...

Word Count : 279

Dynamic loading

Last Update:

go system DLL Hell Direct binding Dynamic binding (computing) Dynamic dispatch Dynamic library Dynamic linker Dynamic-link library FlexOS GNU linker gold...

Word Count : 2091

Ad hoc polymorphism

Last Update:

Strachey in 1967. Ad hoc polymorphism is a dispatch mechanism: control moving through one named function is dispatched to various other functions without having...

Word Count : 970

Dynamic binding

Last Update:

languages Dynamic binding (chemistry) Dynamic dispatch Dynamic linking This disambiguation page lists articles associated with the title Dynamic binding...

Word Count : 66

Generic function

Last Update:

functions refers to a mechanism for compile-time polymorphism (static dispatch), specifically parametric polymorphism. These are functions defined with...

Word Count : 628

PDF Search Engine © AllGlobal.net