Functional Reactive Programming

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

The key traits of FRP are:

  • The concept of "behaviors" or "signals" which model values which 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. 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.

Famous quotes containing the words functional and/or programming:

    In short, the building becomes a theatrical demonstration of its functional ideal. In this romanticism, High-Tech architecture is, of course, no different in spirit—if totally different in form—from all the romantic architecture of the past.
    Dan Cruickshank (b. 1949)

    If there is a price to pay for the privilege of spending the early years of child rearing in the driver’s seat, it is our reluctance, our inability, to tolerate being demoted to the backseat. Spurred by our success in programming our children during the preschool years, we may find it difficult to forgo in later states the level of control that once afforded us so much satisfaction.
    Melinda M. Marshall (20th century)