Old-reactive

From HaskellWiki
Revision as of 06:54, 9 December 2007 by Conal (talk | contribs) (new library (in progress))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Abstract

Reactive is a simple foundation for programming reactive systems functionally. Like Fran/FRP, it has a notions of (reactive) behaviors and events. Like DataDriven, Reactive has a data-driven implementation. The main difference between Reactive and DataDriven is that Reactive builds on STM-based IVars, while DataDriven builds on continuation-based computations.

The inspiration for Reactive was Mike Sperber's [Lula] implementation of FRP. Mike used blocking threads, which I had never considered for FRP. While playing with the idea, I realized that I could give a very elegant and efficient solution to caching, which DataDriven doesn't do. (For an application f <*> a of a varying function to a varying argument, caching remembers the latest function to apply to a new argument and the last argument to which to apply a new function.)

As with DataDriven, Reactive provides instances for Monoid, Functor, Applicative, and Monad.

Besides this wiki page, here are more ways to find out about Reactive:

Please leave comments at the Talk page.

IVars

Events and reactive values

Constant-optimized functions