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.

Reply via email to