This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Dumping and restoring side-effects


Neil Jerram <neil@ossau.uklinux.net> writes:

> I wrote:
> 
>    Your freshener approach sounds compelling to me.  The only issue I
>    have with it is that I don't see why you need to extend the SMOB
>    function table.  Why not just use a hook to store a load of freshener
>    thunks, to be executed after the program is restarted?
> 
> Sorry - I misunderstood that you are not proposing to extend the basic
> set of SMOB functions.  Even so, I think that the question is still
> valid.

Well, I was wondering about whether the basic set of SMOB functions had
any "standard" extension mechanism, and also did query whether dumping
is deemed important enough to adopt freshening (or some variant) for an
upcoming version of guile.

The problemn with a bunch of thunks is that there are lots of objects,
and the thunk is always the same for a given kind of object.  It'd be
redundant to keep a list of thunks, assuming you want the list of
objects that need freshening, too.  Plus at the point where you record
that you need to freshen an object, that code needs to know what the
freshen routine for its kind of object is, and it's better to have that
code associated with the description of those objects, rather than just
thrown about in the code haphazardly.

Greg


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]