Re: FRP
Peter Van Roy <[email protected]> Wed, 21 Mar 2007 08:10:41 +0100
| Newsgroups | gmane.comp.lang.lightweight |
|---|---|
| Message-ID | <[email protected]> |
James McCartney wrote: > On 3/20/07, Shriram Krishnamurthi <[email protected]> wrote: >> James, >> >> I hope we didn't give the impression that we're building the first >> dataflow language. If anything, our citations alone should put to >> rest any such claim. >> >> So is SuperCollider also a dataflow language? Sounds like it -- and >> the more merrier. Is SuperCollider the first dataflow language? Not >> by a long shot, either. A lot of work in this area was done before 1980, but somehow the declarative dataflow work has died out a bit. FRP is very similar to concurrent logic programming, but with extra scheduling constraints to avoid nondeclarative "glitches". The core language of such a system is a functional language extended with threads, logic variable synchronization, and a nondeterministic wait on multiple events. At that level it is not declarative, although at a higher level you can take declarative "snapshots" (at any instant, it looks like a functional calculation). There is another form of concurrent reactive declarative programming, pioneered as far as I can tell by Gilles Kahn in a 1974 paper. This is completely deterministic: it cannot express nondeterminism but it has a fully declarative functional semantics. The nice thing is that the default is deterministic - you can add nondeterminism but only there where it is needed. It also can work together well with lazy evaluation, which I believe is harder for FRP (correct me if I'm wrong). We have an exposition of this form of declarative dataflow in chapter 4 of the book "Concepts, Techniques, and Models of Computer Programming". It's implemented efficiently by the Mozart Programming System (www.mozart-oz.org). Peter Van Roy