why FakeClassPool?

Florin Mateoc Florin at integral.com
Mon May 17 20:37:40 UTC 1999


While browsing some code on the class side, I tried to evaluate a fragment
containg a reference to "self" and, to my surprise, it did not work. I
discovered that for this specific situation, the receiver, instead of being
the actual class, was replaced by an instance of FakeClassPool. I could see
no reason for that. In both VisualWorks and IBM Smalltalk, the receiver is
the class object (not that I like the argument of authority).

I briefly checked that the same approach would work in Squeak, by replacing
in Browser>>doItReceiver
	^ FakeClassPool new
with
	^ self selectedClass

IMHO this is simpler and more useful, but perhaps I am missing something.
Could somebody please enlighten me?

Florin





More information about the Squeak-dev mailing list