[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

initialize-instance on an exisiting instance



    Date: 19 Oct 87 09:01 PDT
    From: Danny Bobrow <Bobrow.pa@Xerox.COM>

    We did not discuss this, but if a user calls

    initialize-instance

    on an existing instance, it seems that it should work.  This would be a
    way of reinitializing an instance.  Is there any problem with this?  I
    would rather this be true than say "it is an error" to initialize an
    instance more than once.   

Given what we said about permissible optimizations in initialize-instance, I
don't see how the semantics of this operation could be well-defined, unless
this isn't really the same initialize-instance that make-instance calls.
That might be reasonable:  change "permissible optimizations in
initialize-instance" to "permissible optimizations in initialize-instance
when called by make-instance."

However, I'm not sure that calling initialize-instance on an existing
instance is going to be a particularly useful operation.  Does it first
reset all the slots to uninitialized?  Regular initialize-instance doesn't
do that.  What if there are user-defined initialize-instance methods that
do such things as adding the instance to an auxiliary data structure?  Can
they tolerate adding it twice?  Or should one call a new function
deinitialize-instance before calling initialize-instance?