[squeak-dev] Tracing proxies

Levente Uzonyi leves at elte.hu
Thu May 26 18:12:34 UTC 2011


On Thu, 26 May 2011, Chris Muller wrote:

>> IMHO #chasePointers and #explorePointers should be moved to the Tools
>> package. The rest can be moved to ProtoObject, ...
>
> Ok, I'll do that sometime soon.
>
>> ... but it's unnecessary. Proxy
>> implementations should use Igor's stratified proxies
>> (http://code.google.com/p/pharo/issues/detail?id=3648 ) instead of
>> subclassing ProtoObject. IMHO we should integrated them to Squeak.
>
> I don't know what a "stratified" proxy is, but a brief look at that
> code looks very interesting!  So, by nil'ing out the methodDictionary,
> it ensures that object gets first chance to "handle" every message,
> even if it is already implemented in Object.

Right.

>
> If so, that's very nicely elegant.  At first, I was hoping this
> approach would allow Magma a chance to handle the problem of passing a
> proxy to a primitive, rather than the user having to send a #yourself,
> but it doesn't look like it would help for that.

If we add this package to the Trunk, then we will be able to identify 
these kind of proxies in the arguments of primitive calls when they fail 
and retry the primitive with the real objects. This should help in most 
cases.

>
> Is there any practical advantage to stratified proxies over standard
> proxies which inherit from ProtoObject, or is it just more elegant?

Yes, by using these proxies we can remove methods which don't have to be 
understood by all objects from ProtoObject.


Levente

>
> thanks..
>
>



More information about the Squeak-dev mailing list