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

Re: (re)initialization revisited



>Even though programmers don't call class-changed or
>update-instance-structure, it is easy to imagine that a programmer would
>want to do a different thing to an instance in these two cases.  The
>cases really are different and programs will want to be sensitive to
>that difference.

I'd like to see a specific example. To justify having four functions, two
of which have different interfaces but do essentially the same thing and
two of which have the same interface but do the same thing except for
calling one function (possibly, if that hasn't been dropped) you would
want to have them be useful in a large number of cases. The fact that
an additional level is being proposed which essentially unifies all
four suggests to me that the number of cases probably won't be that
large. 

The difference between changing the instance structure from an old class
definition to a new, or from one class to another is slight. In both
cases, the common ground is changing the instance structure due to a change
in class. Programmers
that want to do something different in the latter case can specialize
change-class and the reinitialize method to get specialized behavior,
including setting flags or special functions around an invocation of 
call-next-method to get specialized behavior because they are in 
change-class. Likewise for update-instance-structure. This would throw the 
burden of dealing with corner cases on the programmer, rather than trying
to anticipate what the programmer wants and making it part of the language
design.

		jak