[Survey] About the cognitive surcharge of super
Henrik Gedenryd
squeak-dev at lists.squeakfoundation.org
Mon Sep 9 13:45:20 UTC 2002
I'm including my reasoning, haven't checked if the answers are correct...
Henrik
Stephane Ducasse wrote:
> I defined the following method on a class
>
> MyClass>>test1
> ^ super == self
>
Should return true--unless the superclass has a strange #== implementation,
but moreover, I think this is a special selector too so you can't override
it anyway. Reason: This just sends the #== message as implemented in the
superclass.
> MyClass>>test2
> ^ self class == super class
true also. Again because the implementation of #== should be the same in the
superclass, plus sending "super class" also just return's the receiver's
class.
More information about the Squeak-dev
mailing list
|