2010/4/7 Michael Gardner <gardne...@gmail.com>:
> On Apr 6, 2010, at 9:01 AM, Laurent PETIT wrote:
>
>>    * 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 ?
>
> XML with ID/IDREFs seems the obvious choice.

Yes, but while in memory, the ref is a unique java instance, not just
a String representing an unique value.
So you need some mechanism to serialize your ref into a unique value
as in IDREF (and ensure that everywhere the ref isntance is used as a
value, the same IDREF is used).
And when you want to deserialize, you need a mechanism to create a
single ref instance for each IDREF, and ensure that this unique ref
instance for the IDREF is placed in each appropriate value of other
identities ...

I would love to see this handled by the core language (probably in a
polymorphic way).

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