On 31 December 2011 08:08, Meikel Brandmeyer <m...@kotka.de> wrote:
> I think, what James wants to say is: serialising reference types is 
> non-trivial. Reference types are identities. So the instance itself (as in 
> identical?) carries information. When you have references to a ref you have 
> to make sure that they all refer to the same ref again after thawing. Let's 
> say you have a data structure like this:
>
> (let [left-and-right (ref :state)]
>  {:left left-and-right :right left-and-right})
>
> What is the state of this map after thawing? Does it refer to the same ref? 
> Or different ones? If it's different ones, your program is broken now. If 
> left-and-right was a value, the program would now need more memory, but it 
> would be still ok.

This is pretty much what I was trying to say, but Meikel puts it far
more clearly than I managed to.

Serializing refs just seems such a briar patch that I'd prefer an
exception be raised so I know something is wrong.

- James

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