valueWithReceiver:Arguments: Question

Vassili Bykov vassili at objectpeople.com
Fri Feb 6 22:40:51 UTC 1998


At 01:54 PM 2/6/98 -0800, Mike Klein wrote:
>[... neat introspection technique for VW...]
>
>I have found this technique usefull when debugging proxies.  I.E. How to look
>at an object without sending it messages (which may cause it to change state)
>I actually have a class called Investigator.  It's kinda like an Inspector,
>but never sends messages to its target.  Inspector sends things like class,
>and instVarAt: which proxies over-ride to do whatever they are proxying for)

Very neat.  VW 3.0 does the same by introducing a bunch of primitives
"parallel" to those behind #class, #instVarAt:, etc. that work on their
arguments rather than the receiver.  Debugger and PrimitiveObjectInspector
(a subclass of Inspector that does not get fooled by proxies) use them
instead of the regular access.

>I dont know for sure, but I think that this primitive was introduced to allow
>unbound methods to be invoked, primarily for multiple doits... but I'm
guessing.

I also can't bet this was the original motivation, but an important use
that I know of is by Context to handle primitive calls during simulation.
It creates a primitive-only disposable method on the fly, performs it to
let the primitive do its job and then continues with simulation.

--Vassili

-- 
Vassili Bykov         vassili at objectpeople.com
The Object People     http://www.objectpeople.com
+1(613)225-8812





More information about the Squeak-dev mailing list