Difference between revisions of "Callback (computer programming)"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) |
Karl Jones (Talk | contribs) (→See also) |
||
Line 17: | Line 17: | ||
* [[Event-driven programming]] | * [[Event-driven programming]] | ||
* [[Function (programming)]] - a sequence of program instructions that perform a specific task, packaged as a unit. | * [[Function (programming)]] - a sequence of program instructions that perform a specific task, packaged as a unit. | ||
+ | * [[Futures and promises]] | ||
* [[Implicit invocation]] | * [[Implicit invocation]] | ||
* [[Inversion of control]] | * [[Inversion of control]] |
Revision as of 07:38, 25 September 2016
In computer programming, a callback is a piece of executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time.
Description
The invocation may be immediate as in a synchronous callback, or it might happen at a later time as in an asynchronous callback.
In all cases, the intention is to specify a function or subroutine as an entity that is, depending on the language, more or less similar to a variable.
Programming languages support callbacks in different ways, often implementing them with subroutines, lambda expressions, blocks, or function pointers.
See also
- Command pattern
- Computer programming
- Continuation-passing style
- Event loop
- Event-driven programming
- Function (programming) - a sequence of program instructions that perform a specific task, packaged as a unit.
- Futures and promises
- Implicit invocation
- Inversion of control
- libsigc++, a callback library for C++
- Parameter (computer programming)
- Signals and slots
- User exit
- Variable (computer science)
External links
- Callback (computer programming @ Wikipedia