Glossary » active value
active value
a programming language extension that allows functions to be called every time a variable (the active value) is changed.
Along with callbacks and constraint systems, active values belong to a family of techniques that are extremely helpful in programming user interfaces to maintain consistency between data and their graphical representation.
Unlike callbacks, active values are a mechanism integrated into the programming language, so that programming using active values has simpler syntax and does not require explicit maintenance of the list of functions triggered. Unlike constraint systems, the triggering of an active value will always call the associated functions and won’t resolve cycles. For instance, if a function associated with variable A changes the value of variable B, and a function associated with B changes the value of A, then the active value system will cycle forever (unless the program includes explicit checks for cycles).