Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!apple.com!susser From: susser@apple.com (Joshua Susser) Newsgroups: comp.object Subject: Re: "Sender" construct in OOLs Message-ID: <4624@internal.Apple.COM> Date: 10 Oct 89 17:29:22 GMT References: Sender: usenet@Apple.COM Distribution: comp.object Organization: Apple Computer, Inc. (ATG) Lines: 31 In Smalltalk-80, it is possible to get a message's sender by evaluating thisContext sender receiver or something close to that. *thisContext* is a pseudovariable that binds to the MethodContext for the current activation record. The *sender* message answers the calling (or sending) context of *thisContext*, and *receiver* returns the *self* binding for that context. It's been about two years since I played with this stuff and I don't have ST80 handy, so I could have missed something here. And ParcPlace could have changed things since then. Also, I believe that Smalltalk/V-PM has a *self sender* construct that returns the sender object. They were going to just make up a *sender* pseudovariable, but George Bosworth said he was worried about creating another reserved word; I think they should have gone for it. I think using a *sender* construct for mutual recursion could be a little messy. I prefer passing the argument explicitly. The place where I think it is most useful is to discriminate between internal and external invocation of a message. This allows private messages, protection, etc. No objects in my eyes, just dust from Bourbon St. Joshua Susser Apple Computer ,Inc. Object Percussionist Advanced Technology Group arpa: susser@apple.com 20525 Mariani Ave. MS 76-2D uucp: {sun,nsc,...}!apple!susser Cupertino, CA 95014 ALink: susser.j 408/974-6997 I beat on objects.