Home

Indirection

Indirection is the use of an intermediate reference or placeholder to access a target value or object rather than accessing the value directly. It creates a separation between the requester and the target, allowing the identity of the target to be changed without altering the requester.

In computing, indirection appears through pointers, references, handles, and indirect addressing. A program may store a

Indirection is also a structural tool in software design. Names or references act as aliases for actual

Benefits of indirection include decoupling, flexibility, and easier maintenance, since implementations can change without affecting callers.

memory
address
in
a
variable
and
access
the
value
by
dereferencing
the
address.
Levels
of
indirection,
such
as
pointers
to
pointers,
can
increase
flexibility
but
add
complexity.
High-level
languages
use
references
or
object
handles
to
decouple
names
from
concrete
data,
while
low-level
systems
use
indirect
addressing
to
widen
or
relocate
memory
without
changing
instructions.
data,
enabling
abstraction,
modularity,
and
polymorphism.
Lazily
evaluated
or
proxied
components
may
be
swapped
behind
a
stable
interface
because
callers
rely
on
the
indirection
rather
than
direct
data
access.
In
file
systems
and
operating
systems,
symbolic
links
and
file
descriptors
provide
indirection
to
other
files
or
resources,
while
databases
use
views
or
materialized
views
as
indirections
to
underlying
tables.
Drawbacks
include
performance
overhead
from
additional
lookup
steps,
potential
for
reference
errors,
and
increased
cognitive
load
when
reasoning
about
program
behavior.
Indirection
is
a
common
and
powerful
concept
across
computing
and
information
systems,
balancing
abstraction
with
practicality.