Functional reactive programming
Functional reactive programming (FRP) is a programming paradigm for reactive programming using the building blocks of functional programming. FRP has been used for programming GUIs, robotics, and music, aiming to simplify these problems by explicitly modeling time.
Formulations of FRP
Formulations such as Event-Driven FRP and Elm require that updates are discrete and event-driven. These formulations have pushed for practical FRP, focusing on a semantics that have a simple API that can be implemented efficiently in a setting such as robotics or in a web-browser.
In these formulations, it is common that the ideas of behaviors and events are combined into signals that always have a current value, but change discretely.
The earliest formulation of FRP used a continuous semantics, aiming to abstract over many operational details that are not important to the meaning of a program. The key properties of this formulation are:
- Modeling values that vary over continuous time, called "behaviors" and later "signals".
- Modeling "events" which have occurrences at finitely many points in time.
- The system can be changed in response to events, generally termed "switching."
- The separation of evaluation details such as sampling rate from the reactive model.
This semantic model of FRP in side-effect free languages is typically in terms of continuous functions, and typically over time.
- Tao Presentations, FRP language for 3D interactive presentations
- Incremental computing
- Czaplicki, Evan (Apr 2012), Elm: Concurrent FRP for Functional GUIs (PDF) (thesis), Harvard: Test blog, please ignore .
- Nilsson, Henrik; Courtney, Antony; Peterson, John (Feb 2011) , "Functional Reactive Programming, Continued" (PDF), Haskell Workshop (2).
- Taha, Walid; Wan, Zhanyong; Hudak, Paul (2002), "Event-Driven FRP" (PDF), PADL, Yale.
- Czaplicki, Evan; Chong, Stephen (2013), "Asynchronous Functional Reactive Programming for GUIs", PLDI, Harvard.
- Wan, Zhanyong; Taha, Walid; Hudak, Paul (Feb 2011), "Real-Time FRP" (PDF), ICFP (1).
- Elliott, Conal; Hudak, Paul (1997), "Functional Reactive Animation", ICFP.
- Courtney, Antony; Elliott, Conal (Feb 2011) , "Genuinely Functional User Interfaces", Haskell Workshop, Yale.
- Animation & 3D: the Web is doing it wrong (World Wide Web log), Taodyne.
- "What is Functional Reactive Programming?" An intro to FRP with live demos.
- Haskell-related FRP research
- Functional reactive programming with Bacon.js (Web log), Flow dock, Jan 22, 2013.
- RxJava, Netflix Java port of Rx
- React4J, a KISS implementation of FRP in Java SE, compatible with Java 8 Lambdas.
- Frappuccino, FRP implementation in Ruby.
- ReactiveCocoa, an Objective-C framework for FRP.
- ReactiveUI, a cross-platform C# framework for FRP.
- "Deprecating the Observer Pattern with Scala⋅React," Scala.React, an FRP Scala implementation
- Sodium, reactive programming in Java, Haskell and C++