Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[ANN] React 0.9.0
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-01-20 (03:57)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: [ANN] React 0.9.0

I'd like to announce the following module.

React is an OCaml module for functional reactive programming (frp). It  
provides support to program with time varying values : applicative  
events and signals. React doesn't define any primitive event or  
signal, this lets the client chooses the concrete timeline.

React is made of a single, independent, module and distributed under  
the new BSD license.

Project home page :

Although the code is feature complete and has been tested it has not  
been in large scale programs yet. A stable 1.0.0 will be published  
once I feel we have the right api.

Your reactions are welcome,


Various incarnations of frp (frtime, yampa, flapjax, ocamlrt,  
reactive) helped to implement React, thanks to their authors for  
sharing their source.

Here's the answer to the forthcoming question about how React compares  
to ocamlrt. Following are the points I think are different and worth  
mentioning. But as I don't claim to have a thorough understanding of  
how ocamlrt works feel free to correct me or make additions. ocamlrt  
used to be located at  
but recently vanished. The version at  
seems to be an older one.

* React doesn't use the object system. ocamlrt uses it internally.

* React doesn't use any global data structures. Care is still needed  
in multithreaded environments (see docs), but React is more thread and  
modular friendly.

* React treats constant signals separately via smart constructors,  
they are not part of the dataflow graph.

* React uses weak pointers in the dataflow graph's forward  
dependencies and in the update queue to prevent space leaks. ocamlrt  

* React uses client provided functions to test signal value equality.  
ocamlrt doesn't deal correctly with effectful signals. Correctly means  
no value change (according to equality), no update, no effect.

* React has most of pervasives' functions on ints, floats and booleans  
already lifted in specific modules that may be opened in a given  

* React is (and will be) only a pure OCaml reactive runtime.  
Interfacing with primitive events, signals or real time is left to  
React's clients. In other words React corresponds to the functionality  
provided by the library fr of ocamlrt.

* React has a precise description of the combinators' semantic in the  

* React doesn't depend on extlib.

* Performance ? I don't really know. Some aspects may make React  
faster : doesn't leak, doesn't use a global datastore (which involves  
a hashtable and universal types). Some aspects may make it slower :  
use of weak references, subtleties in signal creation, correct  
treatment of equality.

* Being inavailable ocamlrt seems to be a dead project.