[elephant-devel] Mutating slots persistently?

Robert L. Read read at robertlread.net
Fri Feb 17 14:11:01 UTC 2006


Yes --- in my opinion (which gets more humble everyday), you just need
to 
reset the entire slot with setf.

I can't think of a better solution right now.

One could, of course, store the list as separate persistent data items,
or
use a btree for the entire list.  This would make the change to a single
item
of the list more or less automatically saved; however, the great
advantage of 
Elephant is that that it allows you to use the LISP data-space design
that 
you prefer more or less directly, and changing that defeats some of the 
advantage of using Elephant.




On Fri, 2006-02-17 at 12:00 +0100, Tayssir John Gabbour wrote:

> Hi,
> 
> How do people deal with the following problem... suppose I have a
> persistent object with a slot that holds a list. And I mutate the list
> with RPLACA. (Perhaps an innocent-looking SETF which expands into
> RPLACA.) Well, this won't be stored persistently.
> 
> How do people deal with this situation? Basically just always use
> methods which set the entire slot? Are there any tricks to keep from
> having to do this?
> 
> Thanks,
> Tayssir
> 
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20060217/3dd8556e/attachment.html>


More information about the elephant-devel mailing list