On 2012-09-16, at 3:21 PM, Patrik Sundberg <patrik.sundb...@gmail.com> wrote:

> I'm asking myself though if there's a more functional design for 
> accomplishing the same goals? My main goals are to do things consistently so 
> that changing a value X propagates properly, and being able to find 
> dependencies of a given value. A DAG+identity map is my first take, but there 
> may be something more natural for FP I'm completely missing.

Sounds like a reasonable approach to me. There's nothing wrong with state, just 
how you manipulate it. The STM in Clojure is really nice in this regard. You 
might want to have a look at Functional Reactive Programming (FRP). There's a 
lot of stuff available about that in the Haskell community, but usually for UIs 
and things like that. They sometimes use spread sheets as an example (spread 
sheets can be thought of as a DAG with values and computations in cells… you 
can see the mapping between them in your application (where the mapping doesn't 
work or is hard might be pointing at something quite interesting). There's also 
something called 'Cells' in Common Lisp that might be interesting. I'm not sure 
what's been done in Clojure.

Cheers,
Bob

> 
> Thanks,
> Patrik
> 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to