[elephant-devel] Schema evolution

Tayssir John Gabbour tjg at pentaside.org
Wed Oct 31 15:03:50 UTC 2007


Ian Eslick wrote:
 > Redefining a class via defclass, thus initiating calls to change-
 > instance-for-redefined-class is harder because it is lazy in some
 > (or all) lisps.  When a defclass causes a change in a standard class
 > schema, the instances of that class are updated at latest when an
 > object slot is next accessed.  update-instance-for-redefined class
 > can be overloaded by the user for any given class.
 >
 > In standard lisp, there is a problem that if you redefine the class
 > twice and haven't touched the object in the meantime, you will have
 > a different transformed state for each object and only some of them
 > will have had change-instance-for-redefined-class called on them.
 > At least this is empirically true under Allegro.

FWIW, I was thinking this very same thing for my personal project. I'd 
probably try out versioned objects. Each new version of a class is saved 
in Elephant, and there's a middle layer which takes care of redefining 
objects whose classes changed.

I certainly haven't thought this through, but I'd hope it's not bad in 
common cases...


Tayssir



More information about the elephant-devel mailing list