The question of the OP was also a practical one : "is either Clojure
or functional not a good match?"

Honestly, I don't know the answer for sure, because:

  * there is still no (widely known ?) utilities to manipulate things
easily. There were attemps like the one by Jeffrey Streizhem in
clojure contrib, (dataset / datalog), but who's using it "for real" ?
  * The STM is indeed easy to work with, by using the metaphore of the
database (and i think it is the right way of doing things. functions,
and macros to generate some of those functions can help managing the
necessary "level of indirection").
    * BUT : isn't the real problem that one will not content
[him/her]/self with playing with in-memory data ? One will want to
make the data persistent (outside-of-process, aka
storage-persistance). And with this kind of problem, one will have a
graph of identities containing references to other identities (the
needed level(s) of indirection). How does one painlessly store/unstore
those graphs to databases ?

Not to say: how does one totally reliably move data from the STM
to/from an RDBMS ? Currently, the "trick" is to send things to an
agent, but this does not provide all the required guarantees ...


So from the practical point of view, I'm not sure (alas) if clojure
has -yet- the expected "YES!" answer ...


2010/4/6 Douglas Philips <d...@mac.com>:
> On 2010 Apr 6, at 9:09 AM, Christophe Grand wrote:
>>
>> On Mon, Apr 5, 2010 at 4:54 PM, Douglas Philips <d...@mac.com> wrote:
>> Immutability is orthogonal to reference-ness.
>> There is nothing "wrong" with having immutable cyclic graphs of values.
>>
>> There is something wrong with immutable cyclic data structures: an
>> undefined (or unexpected) behaviour on update because of identity and state
>> being conflated again.
>
> ... details elided ...
>>
>> This is not exactly the expected result. The result is confusing because
>> the cyclic reference must be to the identity of the user account not to its
>> actual value.
>
>
> (def john-doe {:name "John Doe" :email "j...@doe.com"})
>
> (def account {:identity john-doe :balance 100} )
>
> (assoc john-doe :email "john.doe at gee mail.com")
>
> Now the account contains old/obsolete data and no cycles are needed to cause
> that.
>
> Doesn't seem that cycles are the problem...
>
>        -Doug
>
> --
> 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
>
> To unsubscribe, reply using "remove me" as the subject.
>

-- 
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