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


Aren't these generic functions essentially doing the same thing?
I understand that a user wanting to smash an instance needs a 
generic function (CHANGE-CLASS) which would change the structure
of the instance to reflect the new class, and initialize, but
why have two ways of updating the new instance? The point of
UPDATE-OBSOLETE-INSTANCE is to give a user hook into transferring
information from the old instance to the new, and that seems
also to be the point of CLASS-CHANGED. I agree that, in the case
of UPDATE-OBSOLETE-INSTANCE, the class object and name are the
same for the old and new instance, while, in the case of CLASS-CHANGED,
this is not the case. But the semantic delta here seems very minor,
since, in both cases, by the time the respective generic function
gets the instance, the structure has changed. The only difference
is how the information on the old instance is transferred to the
generic function. In the case of UPDATE-OBSOLETE-INSTANCE, it is
through lists of slots and their values, while through CLASS-CHANGED,
it seems to be through a copy of the old instance.

Why not simply replace CLASS-CHANGED? Am I missing something?