Higher-Order reactive programming with incremental lists

  • Authors:
  • Ingo Maier;Martin Odersky

  • Affiliations:
  • EPFL, Switzerland;EPFL, Switzerland

  • Venue:
  • ECOOP'13 Proceedings of the 27th European conference on Object-Oriented Programming
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Reactive programming with first class time-varying values as in Functional Reactive Programming (FRP) is a powerful paradigm for designing and implementing event-based applications. Existing implementations deal with simple values. Time-varying collections can only propagate whether they have changed or not but not what has changed. This is inefficient compared to fine-grained callback driven logic that propagates incremental changes. In this work, we present a framework, Scala.React, with reactive abstractions for event streams, time-varying values as well as an incremental reactive list. Our reactive lists support both first-order reactivity by means of composition similar to functional collections via |map|, |filter|, |fold| and alike, as well as higher-order reactivity with support for time-varying collection elements. The framework automatically propagates incremental changes and guarantees strong data consistency. We show in examples that our system is convenient to use and performs well.