[reactive] FRP, continuous time and concurrency
Patai Gergely
patai_gergely at fastmail.fm
Tue Jun 9 02:20:01 EDT 2009
Hi Alvaro,
> Observer patern using the standard FRP conventions? Are these situations
> inside the aims of FRP?
There are several flavours of FRP that approach reactivity from
different angles. I'd say Grapefruit is the one most relevant to the
Observer pattern, since it models complex systems as a network of
interconnected circuits, where circuits are effectful entities, and they
can communicate through both discrete and continuous signals. The other
system that might be relevant is Yampa, since you model entities as
stateful signal functions (but unlike in Grapefruit they cannot perform
side effects), and connect them however you want. Incidentally, both of
these approaches are arrow based.
In contrast, Reactive aims to describe the (output over the) whole
lifetime of an entity as a pure value. Dependencies between entities are
established simply by defining one as a function of the other, and
mutual dependencies are naturally allowed. I don't think there's any
meaningful way to connect the Observer pattern to that. In fact, the
basic OO design patterns are often meaningless in functional
programming, because it's a completely different world.
Gergely
--
http://www.fastmail.fm - Or how I learned to stop worrying and
love email again
More information about the Reactive
mailing list