Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been using Reactive Cocoa (by GitHub), a Functional Reactive Programming API for use with the Cocoa libraries for a while now, but have just read "Out of the Tar Pit", the paper that supposedly presents the concepts behind it, and I am a little confused.

The paper presents (as I understand it) Functional Relational Programming, where relations between data are created with conditions that should be enforced by the FRP system to reduce the amount of 'accidental' logic and state needed.

My question is, are these two concepts - FR(eactive)P and FR(elational)P essentially the same thing (with the former just being an implementation of the latter) or is there a core difference between the two? Unfortunately at the moment my knowledge of the area isn't good enough for me to differentiate them enough.

If there is a difference, it appears to be something to do with, as the name suggests, reacting to changes in data. Certainly, Reactive Cocoa (and Rx in C#) have the concept of creating signals which are triggered on changes in data, and can be used to continuously modify a value over time.

Is this the difference? If not, what is?

(Please excuse the poor tagging, I can't find relevant tags and can't create them yet - please update the tags to something more appropriate if you can.)

share|improve this question
"Out of the Tar Pit" doesn't present the concepts behind functional reactive programming – it's just a good read to understand why state is harmful. Most of it applies to pure FP, FRelP, and FReaP. – Justin Spahr-Summers Apr 12 '13 at 17:00
Ok, that clears things up a bit. Thanks – danpalmer Apr 12 '13 at 17:17
up vote 4 down vote accepted

A reaction can propogate a change without involving a relational model. C = A + B Change A and/or B and C will react to the change (but could end up with the same value). On p. 42

The approach of functional relational programming (FRP16) derives its name from the fact that the essential components of the system (the logic and the essential state) are based upon functional programming and the relational model (see Figure 2).

footnote 16

Not to be confused with functional reactive programming [EH97] which does in fact have some similarities to this approach, but has no intrinsic focus on relations or the relational model

share|improve this answer
Ah I see. There seems to be a lot of cross-over with the reactive frameworks I mentioned and Functional Relational Programming, certainly there are some of the concepts present, but they also draw their concepts of signals from that second paper's Behaviours and Events. – danpalmer Apr 12 '13 at 16:49
The cross-over is mostly at the level of pure FP. The relational and reactive paradigms don't really have much in common. – Justin Spahr-Summers Apr 12 '13 at 17:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.