[racket] Re-inventing dataflow languages
On 10/11/2012 07:26 PM, John Clements wrote:
> I can imagine doing something more complicated, but what I really want to ask is this: for those of you with experience in other dataflow languages, how do they solve this?
The systems I've worked with have used a delay node in the graph rather
than your previous-value idea. If the delay is nonzero (positive), it
can be placed into a feedback cycle. You still have the problem of
specifying what value to use for the delay until the first signals make
it through to the other end, but it could be a less roundabout way of
thinking about the problem?
(define simple-ctr
(network ()
[out (delay (add1 out) 1 #:init 0)]))
vs
(define simple-ctr
(network ()
[out (add1 (delay out 1 #:init 0))]))
Regards,
Tony