Functional reactive programming

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Functional reactive programming (FRP) is a programming paradigm for reactive programming using the building blocks of functional programming.

The key traits of FRP are:[1]

  • The concept of "behaviors" or "signals" which model values that vary over continuous time.
  • The concept of "events" which have occurrences at finitely many points in time.
  • A means to change the FRP system in response to events, generally termed "switching."
  • The separation of evaluation details such as sampling rate from the reactive model.

An additional common but contentious trait is a notion of consistency when ordering events (not just within one stream). Variants include synchrony and glitch freedom.

The semantic model of FRP in side-effect free languages is typically in terms of continuous functions, and typically over time.[2] In contrast, integration with a host language that has side-effects is typically given in terms of data flow or dependency graphs by extending the typical operational semantics to manipulate and use them.

[edit] See also

[edit] References

  1. ^ Conal Elliott and Paul Hudak, "Functional Reactive Animation", ICFP 1997
  2. ^ Antony Courtney and Conal Elliott, Genuinely Functional User Interfaces, 2001 Haskell Workshop

[edit] External links