Fun with Kernel :)

Stephane Ducasse ducasse at iam.unibe.ch
Sat Apr 5 06:22:10 UTC 2003


>> 	(MessageSet isPseudoSelector: selector)
>> 		ifTrue: ["Not really a selector"
>> 			^ nil].
>> 	source _ self
>> 				sourceCodeAt: selector asSymbol
>> 				ifAbsent: [^ nil].
>
> Regarless of what those "pseudo selectors" selectors are it is clearly 
> the
> case that if you ever implement one of them, the method will not work
> correctly. However, for any selector which is not implemented the 
> method
> will answer nil anyway. So what's the point in the test?! None 
> whatsoever.
>

Exactly I was really puzzled.


> Cheers,
>   - Andreas
>
>
>
Prof. Dr. Stéphane DUCASSE
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

"The best way to predict the future is to invent it..." Alan Kay.

Open Source Smalltalks: http://www.squeak.org, 
http://www.gnu.org/software/smalltalk/smalltalk.html
Free books for Universities at 
http://www.esug.org/sponsoring/promotionProgram.html
Free Online Book at 
http://www.iam.unibe.ch/~ducasse/WebPages/FreeBooks.html



More information about the Squeak-dev mailing list