[squeak-dev] [Bug & design issue] Messages understood or not understood by ProtoObject

Jakob Reschke forums.jakob at resfarm.de
Fri Feb 14 21:14:20 UTC 2020


Am Fr., 14. Feb. 2020 um 19:42 Uhr schrieb Eliot Miranda <
eliot.miranda at gmail.com>:

> Hi Christoph,
>
> On Feb 14, 2020, at 9:51 AM, Thiede, Christoph <
> Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
>
>
> > There is a good solution to this.  Low-level Inspectors *should not*
> use instVarAt: et al.  Instead they should access object intervals via “the
> mirror protocol”, see the methods in Context, #object:instVarAt:[put:]
> #object:at:[put:] #objectClass:
>
> I like and do agree to your vision for tidying up ProtoObject!
> Maybe we could also consider some "MetaDecorator" that inherits from
> ProtoObject and implements #class, #instVarAt: etc. for arbitrary targets?
> This might simplify the access to the mirror protocol, and it would be a
> bit more object-oriented:
>
> (MetaDecorator on: aMorph) class "--> Morph"
> (MetaDecorator on: aProxy) class "--> Proxy"
> (MetaDecorator on: aProxy) instVarsInclude: 'target' "--> true"
>
> Sounds good.
>
>
> If inspectors et al would use this, my decorators might not have to carry
the following collection of methods/copies:

asExplorerString basicInspect basicSize class instVarAt: instVarAt:put:
perform: perform:withArguments: primitiveFailed printString
printStringLimitedTo: respondsTo: xxxClass

If DataStream et al did, add the following:
readDataFrom:size: storeDataOn:

I'm not sure how to generally handle #yourself. I have this in my
decorators as well because I don't want to undecorate when the decorator
receives it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200214/9ea097f6/attachment.html>


More information about the Squeak-dev mailing list