<div dir="ltr">Thanks Eliot, I understood that for the inspector use case, but my thought about #yourself was rather the following:<div><br></div><div>If I pass the decorator around and some domain code (not in Inspector or similar) uses the decorator in a cascade with yourself at the end, I do not want the result to be the undecorated object.</div><div><br></div><div>Example:</div><div><br></div><div>    anObject := (MyDecorator on: anotherObject)</div><div>       doSomething;</div><div>       yourself.</div><div><br></div><div>I would like that anObject is the decorator and not anotherObject at the end.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Fr., 14. Feb. 2020 um 22:39 Uhr schrieb Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Jakob,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 14, 2020 at 1:14 PM Jakob Reschke <<a href="mailto:forums.jakob@resfarm.de" target="_blank">forums.jakob@resfarm.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Am Fr., 14. Feb. 2020 um 19:42 Uhr schrieb Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>>:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="auto">Hi Christoph,<div dir="ltr"><br><blockquote type="cite">On Feb 14, 2020, at 9:51 AM, Thiede, Christoph <<a href="mailto:Christoph.Thiede@student.hpi.uni-potsdam.de" target="_blank">Christoph.Thiede@student.hpi.uni-potsdam.de</a>> wrote:</blockquote></div></div><div dir="auto"><div><blockquote type="cite"><div dir="ltr"><div id="gmail-m_1158428000678891236gmail-m_-2272951647195139418m_9070804687102191490gmail-m_-4765481951458005823gmail-m_-8834739960154282493divtagdefaultwrapper" style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<div><br>
</div>
<div>> <span style="font-size:12pt">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:</span>
<div><br>
</div>
<div>I like and do agree to your vision for tidying up ProtoObject!</div>
<div>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:</div>
<div><br>
</div>
<div>(MetaDecorator on: aMorph) class "--> Morph"</div>
<div><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">(MetaDecorator on: aProxy</span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">)
 class "--> Proxy"</span><br>
</div>
<div><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">(MetaDecorator
 on: aProxy</span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">) instVarsInclude: 'target' "--> true"</span><br>
</span></div><div><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><br></span></span></div></div></div></div></blockquote><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;color:rgb(0,0,0)">Sounds good.</span><br><blockquote type="cite"><div dir="ltr"><div style="font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif" dir="ltr"><div>
<div><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><br></span></span></div></div></div></div></blockquote></div></div></div></div></div></div></div></div></blockquote><div>If inspectors et al would use this, my decorators might not have to carry the following collection of methods/copies:</div><div><br></div><div>asExplorerString basicInspect basicSize class instVarAt: instVarAt:put: perform: perform:withArguments: primitiveFailed printString printStringLimitedTo:  respondsTo:  xxxClass<br></div><div><br></div><div>If DataStream et al did, add the following:</div><div>readDataFrom:size: storeDataOn:

<br></div><div><br></div><div>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.</div></div></div>
<br>
</blockquote></div><div><br></div>typically use of the mirror protocol, at its most basic, looks like<br clear="all"><div><br></div><div>    thisContext object: foo instVarAt: index</div><div><br></div><div>so #yourself is handled by ending the cascade early, and answering the object (foo in the above).  Yes that's a tedious refactor, but straightforward, no?  </div>-- <br><div dir="ltr"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div>
<br>
</blockquote></div>