Static dispatch
From Wikipedia, the free encyclopedia
(Redirected from Compile-time polymorphism)
| This article does not cite any sources. (June 2016) (Learn how and when to remove this template message) |
In computing, static dispatch is a form of polymorphism fully resolved during compile time.
Examples are templates in C++, and generic programming in other languages, in conjunction with function overloading (including operator overloading). Code is said to be monomorphised, with specific data types deduced and traced through the call graph, in order to instantiate specific versions of generic functions, and select specific function calls based on the supplied definitions.
This contrasts with dynamic dispatch, which is based on runtime information (such as vtable pointers and other forms of run time type information).
References[edit]
| This programming-language-related article is a stub. You can help Wikipedia by expanding it. |