Indirection

Indirection

In computer programming, indirection is the ability to reference something using a name, reference, or container instead of the value itself. The most common form of indirection is the act of manipulating a value through its memory address. For example, accessing a variable through the use of a pointer. A stored pointer that exists to provide a reference to an object by double indirection is called an "indirection node". In some older computer architectures, indirect words supported a variety of more-or-less complicated addressing modes.

Object-oriented programming makes use of indirection extensively, a simple example being dynamic dispatch. Higher-level examples of indirection are the design patterns of the proxy and the proxy server. Delegation is another classic example of an indirection pattern. In strongly-typed interpreted languages with dynamic datatypes, most variable references require a level of indirection: first the type of the variable is checked for safety, and then the pointer to the actual value is dereferenced and acted on.

Recursive types are usually implemented using indirection because otherwise if a value of a datatype can contain the entirety of another value of the same datatype, there is no limit to the size a value of this datatype could need.

When doing symbolic programming from a formal mathematical specification the use of indirection can be quite helpful. To start with a simple example the variables x, y and z in an equation such as z = square root (x squared + y squared) can refer to any number. One could imagine objects for various numbers and then x, y and z could point to the specific numbers being used for a particular problem. The simple example has its limitation as there are infinitely many real numbers. In various other parts of symbolic programming there are only so many symbols. So to move on to a more significant example, in logic the formula α can refer to any formula, so it could be β, γ, δ, ... or η→π, ς v σ,.... When set-builder notation is employed the statement Δ={α} means the set of all formulae - so although the reference is to α there are two levels of indirection here, the first to the set of all α and then the second to a specific formula for each occurrence of α in the set Δ.

Indirection occurs also in linguistics, especially in agglutinative languages, such as the Finnish language or Turkish languageFact|date=September 2008.

ee also

* Handle
* Pointer
* Reference

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Indirection — In di*rec tion, n. [Cf. F. indirection.] Oblique course or means; dishonest practices; indirectness. By indirections find directions out. Shak. [1913 Webster] …   The Collaborative International Dictionary of English

  • indirection — I (deceitfulness) noun concealment of truth, cozenage, craft, craftiness, cunning, deceit, deception, deviousness, dishonesty, disingenuity, disingenuousness, dissimulation, duplicity, falsehood, falseness, fraud, fraudulency, guile, hypocrisy,… …   Law dictionary

  • indirection — (n.) c.1600, from INDIRECT (Cf. indirect) + ION (Cf. ion) …   Etymology dictionary

  • indirection — [in΄də rek′shən; ] occas. [, in΄dīrek′shən] n. [< INDIRECT, by analogy with DIRECTION] 1. roundabout act, procedure, or means 2. deceit; dishonesty 3. lack of direction or purpose …   English World dictionary

  • indirection — /in deuh rek sheuhn, duy /, n. 1. indirect action or procedure. 2. a roundabout course or method. 3. a lack of direction or goal; aimlessness: His efforts were marked by indirection and indecisiveness. 4. deceitful or dishonest dealing. [1585 95; …   Universalium

  • indirection — indirect ► ADJECTIVE 1) not direct. 2) (of costs) deriving from overhead charges or subsidiary work. 3) (of taxation) levied on goods and services rather than income or profits. DERIVATIVES indirection noun indirectly adverb indirectness noun …   English terms dictionary

  • indirection — noun 1. indirect procedure or action (Freq. 1) he tried to find out by indirection • Hypernyms: ↑procedure, ↑process 2. deceitful action that is not straightforward he could see through the indirections of diplomats • Hypernyms …   Useful english dictionary

  • indirection — noun Date: 1590 1. a. indirect action or procedure b. lack of direction ; aimlessness 2. a. lack of straightforwardness and openness ; deceitfulness b. something (as an act or statement) marked by lack of straightforwardness < hated diplomatic… …   New Collegiate Dictionary

  • indirection — noun /ˈɪndəˈɹɛkʃən,ˈɪndɪˈɹɛkʃən,ˈɪndaɪˈɹɛkʃən/ a) A lack of direction; deviousness or aimlessness b) Use of a variable or object through its address …   Wiktionary

  • indirection — (in di rè ksion) s. f. Défaut de direction. ÉTYMOLOGIE    In.... 1, et direction …   Dictionnaire de la Langue Française d'Émile Littré

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”