Randomized trial demonstrates change detection improvements in state-based reactive programming, indicating simpler implementations.
Reactive programming is an integral part of modern software development. It favors a broad class of contemporary software systems that respond to user input, network messages, and other events. However, implementing reactive programming concepts such as data bindings and constraints in object-oriented environments remains challenging. Change detection represents a difficult but inevitable necessity of every implementation of reactive programming concepts. Despite being quite similar to each other, most change detection mechanisms are typically not intended for reuse and are tightly coupled to an implementation's change resolution. As a result, developers of reactive programming concepts often have to re-invent and implement similar mechanisms. An expressive and reusable abstraction for change detection is still missing. In our search for a suitable abstraction, we identify commonalities to leverage in existing reactive programming concepts. We discover a class of reactive programming concepts we call state-based that rely on the same type of change detection: they detect changes in an object-oriented expression's evaluation result. We propose active expressions as a reusable abstraction for change detection in state-based reactive programming concepts to simplify their implementation. We evaluate active expressions by re-implementing multiple existing state-based reactive programming concepts in terms of them. In particular, we re-implement signals, constraints, reactive object queries, and implicit layer activation. The resulting implementations lead to less and more concise code than comparable implementations based directly on more general mechanisms such as source code rewriting or dynamic interpretation. Further, active expressions remove some limitations from implementations of reactive programming concepts. Using active expressions, we extend graphical dataflow connectors to generic properties, remove the need for manual annotations in a web front-end framework, and integrate implicit layer activation with life-cycle callbacks and reactive behavior adaptations. With active expressions as a new abstraction for change detection, developers of reactive programming concepts can simplify their integration into the host environment and focus on how to react to change. With that, we encourage the creation and development of novel approaches to reactive programming concepts to advance the state of the art of reactive programming regarding concepts, their implementation, and their application.
No takes yet. Share an insight, caveat, or question.
Stefan Ramson (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: