Hi 2016-03-26 21:54 GMT+01:00 Tudor Girba <tudor@tudorgirba.com>:
Hi,
I am trying to play with some proxies that inherit from ProtoObject have slots. For example, I try to do this, but I get an error:
ProtoObject subclass: #BBB instanceVariableNames: 'variable' classVariableNames: '' package: 'BBB'. BBB class allSlots first read: BBB new
The problem is that the slot sends messages to its parent object, such as: IndexedSlot>>read: anObject ^ anObject instVarAt: index
This is a problem because a similar scenario happens also when you open a debugger on a proxy that tries to communicate with a remote image.
I think that instead of sending messages to the receiver, we should make the slot work with the mirror primitives.
For example, we would rewrite the read: method like: IndexedSlot>>read: anObject ^ thisContext object: anObject instVarAt: index
Do you agree? Can I open an issue for this? I think this is important.
Yes, please. But does not thisContext degrades performance? Guille extracted mirror primitives to separate class MirrorPrimitives (project Mirror in Pharo repo). I think we should start to use it and move away from context.