isKindOf: vs. isClassX methods
tim at sumeru.stanford.edu
Thu Oct 11 06:19:23 UTC 2001
Scott A Crosby <crosby at qwes.math.cmu.edu> is widely believed to have written:
> What it is is confusing two things, sometimes, you do care about the
> actual class, because your code does need to get into the grotty
> implementation. Here, using isKindOf: is important. In my case for some
> code I did recently (the 33% gain with macroBenchmark1), I did need
> isKindOf, in this sense of things.
Nope, not really. Double dispatching would make a better answer most
likely. As in (pidgeon code)
create new sized array.
copy first load to beginning of it.
ask replacementCollection to insert itself in right place
copy last load to end.
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
"Daddy, what does FORMATTING DRIVE C mean?"
More information about the Squeak-dev