[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
This message suggests some better names.
I'm willing to take a shot at putting this new material into Chapters 1
Date: Wed, 20 Apr 88 23:51 EDT
From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
This message comments on the proposed revamping of the ch1 object
creation protocol in support of ch3.
Date: 13 Apr 88 11:15 PDT
From: Danny Bobrow <Bobrow.pa@Xerox.COM>
The four updating functions are:
initialize-new-instance instance &rest initialization-arguments
reinitialize-instance instance &rest initialization-arguments
update-instance-structure instance added-slots discarded-slots property-list
update-instance-with-new-class previous current
This suggests renaming update-instance-structure to
update-instance-with-redefined-class. With that change all five
names look consistent and fairly clear as to their meanings.
Suggestion 1 (to be superseded below by Suggestion 2):
How about these two names instead of "-with-new-class" and
"-with-redefined-class"? "With" seems overloaded, and this use of it
is inconsistent with "with-open-file", etc. Also, "new class" is
overloaded; it means both "newly-created class" and "different class".
Suggestion 2 (this one I prefer):
Let's get rid of the "-structure" from these names, and use the
Why? Well, take a look at pages 1-15 and 1-16. The chapter on
Redefining Classes explains that this is a two-step process. Step 1 is
"Modifying the Structure of Instances", which is done by an un-named
process. Step 2 is called "Initializing Newly-added Local Slots",
which is done by the generic function currently called
update-instance-structure. Thus update-instance-structure has nothing
to do with updating the instance structure, because it is called AFTER
the instance structure has been updated.
Just plain update-instance-for-different-class and
update-instance-for-redefined-class seem to describe what they actually
do, where "update-instance-" is shorthand for "update the appropriate
slots of the instance to have the correct values".