[Survey] About the cognitive surcharge of super

Stephane Ducasse ducasse at iam.unibe.ch
Fri Sep 6 15:58:32 UTC 2002


Hi

I tried the following test on a lot of people and I was surprised to 
see that so much people got confused.

I defined the following method on a class

MyClass>>test1
	^ super == self

MyClass>>test2
	^ self class == super class


then asked MyClass new test1 and MyClass new test2.

I would like you to try and think as much as you can about the answer.
Then replied to this email with the results you thought.
If you do the tests around you please report to me the result you got.




Do the test before reading further...

I found that lot of people were confused by the second test. I have the 
impression that super is cognitively overloaded and should have be be 
called overriden or callNextMethod as in clos.
For now I got only three good answers including mine :).


Dr. Stéphane DUCASSE (ducasse at iam.unibe.ch) 
http://www.iam.unibe.ch/~ducasse/
  "if you knew today was your last day on earth, what would you do
  different? ... especially if, by doing something different, today
  might not be your last day on earth" Calvin&Hobbes




More information about the Squeak-dev mailing list