reactive programming
In computing, reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change. With this paradigm, it is possible to express static (e.g., arrays) or dynamic (e.g., event emitters) data streams with ease, and also communicate that an inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow. For example, in imperative programming, a := b + c would mean that a is being assigned the result of b + c at the time the expression is evaluated, and later, the values of b and c can be changed with no effect on the value of a . In contrast, in reactive programming, the value of a is automatically updated whenever the values of b or c change, without the program having to explicitly re-state the statement a := b + c to re-assign the value of a .…
In computing, reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change. With this paradigm, it is possible to express static (e.g., arrays) or dynamic (e.g., event emitters) data streams with ease, and also communicate that an inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow. For example, in imperative programming, a := b + c would mean that a is being assigned the result of b + c at the time the expression is evaluated, and later, the values of b and c can be changed with no effect on the value of a . In contrast, in reactive programming, the value of a is automatically updated whenever the values of b or c change, without the program having to explicitly re-state the statement a := b + c to re-assign the value of a . int b = 1; int c = 2; int a = b + c; b = 10; System.out.println(a); // 3 (not 12 because "=" is not a reactive assignment operator) // now imagine a special operator "$=" exists that changes the value of a variable (executes code on the right side of the operator and assigns result to left side variable) whenever explicitly initialized, and when referenced variables (on the right side of the operator) are changed int b = 1; int c = 2; int a $= b + c; b = 10; System.out.println(a); // 12 Another example is a hardware description language such as Verilog, where reactive programming enables changes to be modeled as they propagate through circuits. Reactive programming has been proposed as a way to simplify creating interactive user interfaces and near-real-time computing animation. For example, in a model–view–controller (MVC) architecture, reactive programming can facilitate changes in an underlying model being reflected automatically in an associated view. t = seconds + 1 g = (t > seconds) Because t should always be greater than seconds , this expression should always evaluate to a true value. Unfortunately, this can depend on the order of evaluation. When seconds changes, two expressions have to update: seconds + 1 and the conditional. If the first evaluates before the second, then this invariant will hold. If, however, the conditional updates first, using the old value of t and the new value of seconds , then the expression will evaluate to a false value. This is called a glitch. Some reactive languages are glitch-free and prove this property. This is usually achieved by topologically sorting expressions and updating values in topological order. This can, however, have performance implications, such as delaying the delivery of values (due to the order of propagation). In some cases, therefore, reactive languages permit glitches, and developers must be aware of the possibility that values may temporarily fail to correspond to the program source, and that some expressions may evaluate multiple times (for instance, t > seconds may evaluate twice: once when the new value of seconds arrives, and once more when t updates). t = if ((seconds mod 2) == 0): seconds + 1 else: seconds - 1 end t + 1 Every second, the value of this expression changes to a different reactive expression, which t + 1 then depends on. Therefore, the graph of dependencies updates every second. Permitting dynamic updating of dependencies provides significant expressive power (for instance, dynamic dependencies routinely occur in graphical user interface (GUI) programs). However, the reactive update engine must decide whether to reconstruct expressions each time, or to keep an expression's node constructed but inactive; in the latter case, ensure that they do not participate in the computation when they are not supposed to be active. A n →B n →A n+1 , A n →C n →A n+1 , where n=1,2... This problem could be overcome by propagating invalidation only when some data is not already invalidated, and later re-validate the data when needed using lazy evaluation. One inherent problem for reactive programming is that most computations that would be evaluated and forgotten in a normal programming language, needs to be represented in the memory as data-structures. This could potentially make reactive programming highly memory consuming. However, research on what is called lowering could potentially overcome this problem. On the other side, reactive programming is a form of what could be described as "explicit parallelism" , and could therefore be beneficial for using the power of parallel hardware. ==References==
References
- Distributed Functional Reactive Programming on Actor-Based Runtime · retrieved 2021-06-23 · rev 1374071317
Cite this reference
MLA "Distributed Functional Reactive Programming on Actor-Based Runtime." Shibanai, Kazuhiro; Watanabe, Takuo (2018). 2021-06-23. https://dl.acm.org/doi/10.1145/3281366.3281370. Accessed 24 November 2026.
Chicago "Distributed Functional Reactive Programming on Actor-Based Runtime." Shibanai, Kazuhiro; Watanabe, Takuo (2018). 2021-06-23. https://dl.acm.org/doi/10.1145/3281366.3281370.
APA Shibanai, Kazuhiro; Watanabe, Takuo (2018). (2021). Distributed Functional Reactive Programming on Actor-Based Runtime. Retrieved November 24, 2026, from https://dl.acm.org/doi/10.1145/3281366.3281370
- Embedding Dynamic Dataflow in a Call-by-Value Language · retrieved 2016-10-08 · rev 1374071317
Cite this reference
MLA "Embedding Dynamic Dataflow in a Call-by-Value Language." 2016-10-08. https://cs.brown.edu/~sk/Publications/Papers/Published/ck-frtime/. Accessed 24 November 2026.
Chicago "Embedding Dynamic Dataflow in a Call-by-Value Language." 2016-10-08. https://cs.brown.edu/~sk/Publications/Papers/Published/ck-frtime/.
APA encyclopegia.org. (2016). Embedding Dynamic Dataflow in a Call-by-Value Language. Retrieved November 24, 2026, from https://cs.brown.edu/~sk/Publications/Papers/Published/ck-frtime/
- Crossing State Lines: Adapting Object-Oriented Frameworks to Functional Reactive Languages · retrieved 2016-10-08 · rev 1374071317
Cite this reference
MLA "Crossing State Lines: Adapting Object-Oriented Frameworks to Functional Reactive Languages." 2016-10-08. https://cs.brown.edu/~sk/Publications/Papers/Published/ick-adapt-oo-fwk-frp/. Accessed 24 November 2026.
Chicago "Crossing State Lines: Adapting Object-Oriented Frameworks to Functional Reactive Languages." 2016-10-08. https://cs.brown.edu/~sk/Publications/Papers/Published/ick-adapt-oo-fwk-frp/.
APA encyclopegia.org. (2016). Crossing State Lines: Adapting Object-Oriented Frameworks to Functional Reactive Languages. Retrieved November 24, 2026, from https://cs.brown.edu/~sk/Publications/Papers/Published/ick-adapt-oo-fwk-frp/
- Lowering: a static optimization technique for transparent functional reactivity · retrieved 2014-09-07 · rev 1374071317
Cite this reference
MLA "Lowering: a static optimization technique for transparent functional reactivity." Burchett, Kimberley; Cooper, Gregory H. 2014-09-07. https://cs.brown.edu/~sk/Publications/Papers/Published/bck-lowering-opt-trans-frp/paper.pdf. Accessed 24 November 2026.
Chicago "Lowering: a static optimization technique for transparent functional reactivity." Burchett, Kimberley; Cooper, Gregory H. 2014-09-07. https://cs.brown.edu/~sk/Publications/Papers/Published/bck-lowering-opt-trans-frp/paper.pdf.
APA Burchett, Kimberley; Cooper, Gregory H. (2014). Lowering: a static optimization technique for transparent functional reactivity. Retrieved November 24, 2026, from https://cs.brown.edu/~sk/Publications/Papers/Published/bck-lowering-opt-trans-frp/paper.pdf
- Bainomugisha, Engineer; Carreton, Andoni Lombide; Van Cutsem, Tom; Mostinckx, Stijn; De Meuter, Wolfgang (2013). A survey on reactive programming (Report). Association for Computing Machinery (ACM) . Retrieved 2026-05-17 . Also has taxonomy of extant reactive programming approaches. Wikipedia revision 1374071317, retrieved 2026-11-18 · retrieved 2026-05-16 · rev 1374071317
Cite this reference
MLA "Bainomugisha, Engineer; Carreton, Andoni Lombide; Van Cutsem, Tom; Mostinckx, Stijn; De Meuter, Wolfgang (2013). A survey on reactive programming (Report). Association for Computing Machinery (ACM) . Retrieved 2026-05-17 . Also has taxonomy of extant reactive programming approaches. Wikipedia revision 1374071317, retrieved 2026-11-18." Bainomugisha, Engineer; Carreton, Andoni Lombide; Van Cutsem, Tom; Mostinckx, Stijn; De Meuter, Wolfgang (2013). 2026-05-16. http://dl.acm.org/citation.cfm?id=2501666. Accessed 24 November 2026.
Chicago "Bainomugisha, Engineer; Carreton, Andoni Lombide; Van Cutsem, Tom; Mostinckx, Stijn; De Meuter, Wolfgang (2013). A survey on reactive programming (Report). Association for Computing Machinery (ACM) . Retrieved 2026-05-17 . Also has taxonomy of extant reactive programming approaches. Wikipedia revision 1374071317, retrieved 2026-11-18." Bainomugisha, Engineer; Carreton, Andoni Lombide; Van Cutsem, Tom; Mostinckx, Stijn; De Meuter, Wolfgang (2013). 2026-05-16. http://dl.acm.org/citation.cfm?id=2501666.
APA Bainomugisha, Engineer; Carreton, Andoni Lombide; Van Cutsem, Tom; Mostinckx, Stijn; De Meuter, Wolfgang (2013). (2026). Bainomugisha, Engineer; Carreton, Andoni Lombide; Van Cutsem, Tom; Mostinckx, Stijn; De Meuter, Wolfgang (2013). A survey on reactive programming (Report). Association for Computing Machinery (ACM) . Retrieved 2026-05-17 . Also has taxonomy of extant reactive programming approaches. Wikipedia revision 1374071317, retrieved 2026-11-18. Retrieved November 24, 2026, from http://dl.acm.org/citation.cfm?id=2501666
- Reactive Programming: MIMOSA Project of INRIA – ENSMP · retrieved 2026-05-16 · rev 1374071317
Cite this reference
MLA "Reactive Programming: MIMOSA Project of INRIA – ENSMP." Boussinot, Frederic (26 March 2007). 2026-05-16. http://www-sop.inria.fr/mimosa/rp/. Accessed 24 November 2026.
Chicago "Reactive Programming: MIMOSA Project of INRIA – ENSMP." Boussinot, Frederic (26 March 2007). 2026-05-16. http://www-sop.inria.fr/mimosa/rp/.
APA Boussinot, Frederic (26 March 2007). (2026). Reactive Programming: MIMOSA Project of INRIA – ENSMP. Retrieved November 24, 2026, from http://www-sop.inria.fr/mimosa/rp/
- 13: Streaming · retrieved 2026-11-17 · rev 1374071317
Cite this reference
MLA "13: Streaming." Roestenburg, Raymond; Bakker, Rob; Williams, Rob (2016). 2026-11-17. https://en.wikipedia.org/wiki/ISBN_(identifier). Accessed 24 November 2026.
Chicago "13: Streaming." Roestenburg, Raymond; Bakker, Rob; Williams, Rob (2016). 2026-11-17. https://en.wikipedia.org/wiki/ISBN_(identifier).
APA Roestenburg, Raymond; Bakker, Rob; Williams, Rob (2016). (2026). 13: Streaming. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/ISBN_(identifier)
- Reactive Imperative Programming with Dataflow Constraints · retrieved 2026-11-17 · rev 1374071317
Cite this reference
MLA "Reactive Imperative Programming with Dataflow Constraints." Demetrescu, Camil; Finocchi, Irene; Ribichini, Andrea (22 October 2011). 2026-11-17. http://dl.acm.org/citation.cfm?id=2048100. Accessed 24 November 2026.
Chicago "Reactive Imperative Programming with Dataflow Constraints." Demetrescu, Camil; Finocchi, Irene; Ribichini, Andrea (22 October 2011). 2026-11-17. http://dl.acm.org/citation.cfm?id=2048100.
APA Demetrescu, Camil; Finocchi, Irene; Ribichini, Andrea (22 October 2011). (2026). Reactive Imperative Programming with Dataflow Constraints. Retrieved November 24, 2026, from http://dl.acm.org/citation.cfm?id=2048100
- Relation Algebra as programming language using the Ampersand compiler · retrieved 2026-11-17 · rev 1374071317
Cite this reference
MLA "Relation Algebra as programming language using the Ampersand compiler." Joosten, Stef (2018). 2026-11-17. https://doi.org/10.1016%2Fj.jlamp.2018.04.002. Accessed 24 November 2026.
Chicago "Relation Algebra as programming language using the Ampersand compiler." Joosten, Stef (2018). 2026-11-17. https://doi.org/10.1016%2Fj.jlamp.2018.04.002.
APA Joosten, Stef (2018). (2026). Relation Algebra as programming language using the Ampersand compiler. Retrieved November 24, 2026, from https://doi.org/10.1016%2Fj.jlamp.2018.04.002
- Trellis Tele community. Model-view-controller and the observer pattern (Report). PEAK: Python Enterprise Application Kit. Archived from the original on 2016-03-03 . Retrieved 2009-07-27 . Wikipedia revision 1374071317, retrieved 2026-11-18 · retrieved 2009-07-26 · rev 1374071317
Cite this reference
MLA "Trellis Tele community. Model-view-controller and the observer pattern (Report). PEAK: Python Enterprise Application Kit. Archived from the original on 2016-03-03 . Retrieved 2009-07-27 . Wikipedia revision 1374071317, retrieved 2026-11-18." Trellis Tele community. 2009-07-26. http://peak.telecommunity.com/DevCenter/Trellis#model-view-controller-and-the-observer-pattern. Accessed 24 November 2026.
Chicago "Trellis Tele community. Model-view-controller and the observer pattern (Report). PEAK: Python Enterprise Application Kit. Archived from the original on 2016-03-03 . Retrieved 2009-07-27 . Wikipedia revision 1374071317, retrieved 2026-11-18." Trellis Tele community. 2009-07-26. http://peak.telecommunity.com/DevCenter/Trellis#model-view-controller-and-the-observer-pattern.
APA Trellis Tele community. (2009). Trellis Tele community. Model-view-controller and the observer pattern (Report). PEAK: Python Enterprise Application Kit. Archived from the original on 2016-03-03 . Retrieved 2009-07-27 . Wikipedia revision 1374071317, retrieved 2026-11-18. Retrieved November 24, 2026, from http://peak.telecommunity.com/DevCenter/Trellis#model-view-controller-and-the-observer-pattern
- Tackling the Awkward Squad for Reactive Programming: The Actor-Reactor Model · retrieved 2021-06-23 · rev 1374071317
Cite this reference
MLA "Tackling the Awkward Squad for Reactive Programming: The Actor-Reactor Model." Van den Vonder, Sam; Renaux, Thierry; Oeyen, Bjarno; De Koster, Joeri; De Meuter, Wolfgang (2020). 2021-06-23. https://drops.dagstuhl.de/opus/volltexte/2020/13176/. Accessed 24 November 2026.
Chicago "Tackling the Awkward Squad for Reactive Programming: The Actor-Reactor Model." Van den Vonder, Sam; Renaux, Thierry; Oeyen, Bjarno; De Koster, Joeri; De Meuter, Wolfgang (2020). 2021-06-23. https://drops.dagstuhl.de/opus/volltexte/2020/13176/.
APA Van den Vonder, Sam; Renaux, Thierry; Oeyen, Bjarno; De Koster, Joeri; De Meuter, Wolfgang (2020). (2021). Tackling the Awkward Squad for Reactive Programming: The Actor-Reactor Model. Retrieved November 24, 2026, from https://drops.dagstuhl.de/opus/volltexte/2020/13176/
- Topology-Level Reactivity in Distributed Reactive Programs: Reactive Acquaintance Management using Flocks · retrieved 2023-03-15 · rev 1374071317
Cite this reference
MLA "Topology-Level Reactivity in Distributed Reactive Programs: Reactive Acquaintance Management using Flocks." Van den Vonder, Sam; Renaux, Thierry; De Meuter, Wolfgang (14 June 2022). 2023-03-15. https://programming-journal.org/2022/6/14/. Accessed 24 November 2026.
Chicago "Topology-Level Reactivity in Distributed Reactive Programs: Reactive Acquaintance Management using Flocks." Van den Vonder, Sam; Renaux, Thierry; De Meuter, Wolfgang (14 June 2022). 2023-03-15. https://programming-journal.org/2022/6/14/.
APA Van den Vonder, Sam; Renaux, Thierry; De Meuter, Wolfgang (14 June 2022). (2023). Topology-Level Reactivity in Distributed Reactive Programs: Reactive Acquaintance Management using Flocks. Retrieved November 24, 2026, from https://programming-journal.org/2022/6/14/
Cite this article
MLA
"reactive programming." encyclopegia.org, 2026, https://encyclopegia.org/wiki/reactive-programming. Accessed 24 November 2026.
Chicago
"reactive programming." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/reactive-programming.
APA
encyclopegia.org. (2026). reactive programming. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/reactive-programming
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON