HOME

TheInfoList



OR:

In
computer programming Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as anal ...
, suppose we have a data item A whose value depends on data item B, i.e., the value of A must be changed after the value of B changes and before the value of A becomes necessary. Active updating is updating A immediately after B changes, while passive updating or lazy updating (
lazy evaluation In programming language theory, lazy evaluation, or call-by-need, is an evaluation strategy which delays the evaluation of an expression until its value is needed ( non-strict evaluation) and which also avoids repeated evaluations ( sharing). T ...
) is updating A immediately before its value is fetched. And example of this distinction is, e.g., in the implementation of GUI applications: the list of submenu items may depend on the state of the application; this list may be updated either as soon as the state of the application changes ("active") or only when the menu is invoked ("passive"). Another example is update a visual display as soon as the underlying data change as opposed to clicking the "redraw" button. In this situation active update may create a problem to deal with: an abrupt change of some part of the display may coincide in time with the
saccadic movement A saccade ( , French for ''jerk'') is a quick, simultaneous movement of both eyes between two or more phases of fixation in the same direction.Cassin, B. and Solomon, S. ''Dictionary of Eye Terminology''. Gainesville, Florida: Triad Publishi ...
of the eye, and the change may go unnoticed by a human observer.


See also

*
Direct updating Direct may refer to: Mathematics * Directed set, in order theory * Direct limit of (pre), sheaves * Direct sum of modules, a construction in abstract algebra which combines several vector spaces Computing * Direct access (disambiguation), ...
vs.
deferred updating Defer may refer to: * Defer Elementary School, a Michigan State Historic Site * Deference, the acknowledgement of the legitimacy of the power of one's superior or superiors * Deferral, the delaying of the realization of an asset or liability un ...
in
transaction processing Transaction processing is information processing in computer science that is divided into individual, indivisible operations called ''transactions''. Each transaction must succeed or fail as a complete unit; it can never be only partially compl ...
.C++ Move Semantics for Exception Safety and Optimization in Software Transactional Memory Libraries
In book: Proceedings of the Third International Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (ICOOOLPS), 2008


References

Programming idioms {{software-eng-stub