Simply efficient functional reactivity. Conal Elliott.

Functional reactive programming (FRP) has simple and powerful semantics, but has resisted efficient implementation. In particular, most past implementations have used demand-driven sampling, which accommodates FRP's continuous time semantics and fits well with the nature of functional programming. Consequently, values are wastefully recomputed even when inputs don't change, and reaction latency can be as high as the sampling period.

This paper presents a way to implement FRP that combines data- and demand-driven evaluation, in which values are recomputed only when necessary, and reactions are nearly instantaneous. The implementation is rooted in a new simple formulation of FRP and its semantics and so is easy to understand and reason about.

On the road to efficiency and simplicity, we'll meet some old friends (monoids, functors, applicative functors, monads, morphisms, and improving values) and make some new friends (functional future values, reactive normal form, and concurrent â€œunambiguous choiceâ€).

I'm not sure exactly where to classify this submission to ICFP 2008, but I think many here will be interested in it.

## Recent comments

14 min 14 sec ago

23 min 16 sec ago

26 min 47 sec ago

1 hour 17 min ago

1 hour 44 min ago

1 hour 54 min ago

1 hour 57 min ago

1 hour 59 min ago

2 hours 2 min ago

4 hours 41 min ago