Harvey J. Stein abel@netvision.net.il
Sat, 10 May 1997 22:19:21 +0300

Paul Prescod writes:
 > > The only point at which I might need to take persistence into account
 > > is where I'm creating an object whose persistent characteristics are
 > > not the default. And that is not terribly common, and certainly should
 > > not be visible to the user.
 > Most of the apps I write have different persistence characteristics.
 > They do a lot of work with data that should not be saved to disk and
 > then return a little bit of data that SHOULD BE. So you're making your
 > apps easier to write and making mine either harder (I must explicitly
 > tag hundred of objects "not persistent") or slower.

If I understand what's being proposed (which is admittedly a little
difficult given that no one's formally submitted an API proposal), I
don't think you'd have to do this.  I think, for example, you'd just
have to make sure that some global symbol contains a list containing
those little bits of data that you're refering to, and that all the
rest of the data is created inside of (let ..) constructs so that it
ultimately gets thrown away.

What you'd gain is that you don't have to write anything to explicitly
write those little bits to disk, and you wouldn't have to write
anything to explicitly read them - they'll always be in that global
variable into which you put them.

If you want versioning of these little bits, you'd basically do the
same as you'd do if you had a file system, but it'd be easier because
you wouldn't have to try to munge version info into the file names.
You could, for example, keep a global variable with an assoc list of
(version-number little bits of data), or keep afew global hash tables
around - little-bits-by-date, little-bits-by-version-number, etc.

It's not as if anything that would have been garbage collected will
suddenly stick around and show up on the disk.  I think it's more like
maintaining a workspace that survives between reboots - not much
different from periodically running (dumplisp).  I guess it's similar
to Smalltalk systems where the user can periodically hit the save
button, and the entire system state is written to disk.

Harvey J. Stein
Berger Financial Research