Hi Clément,<div><br></div><div>    this is a bug.  Thanks for finding it.  <br><br><div class="gmail_quote">On Tue, Jul 9, 2013 at 1:15 AM, Clément Bera <span dir="ltr">&lt;<a href="mailto:bera.clement@gmail.com" target="_blank">bera.clement@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello pharoers,<div><br></div><div>Recently I have been looking at the Pharo thisContext capabilities, in order to perhaps one day in the far future edit its implementation with the Pharo dev team. Nothing is planned or confirmed, it is just to discuss.</div>


<div><br></div><div>A context has instances variables (method closureOrNil receiver stackp sender pc) and holds the arguments and temporaries.</div><div><br></div><div>Now I&#39;d like to know what context&#39;s state do we modify, and what states are just internal representations ?</div>


<div><br></div><div>For example, it seems that you can do &#39;thisContext receiver: #foo&#39;, but you cannot with Cog.</div><div><br></div><div><div>SomeClass&gt;&gt;foo</div><div><span style="white-space:pre-wrap">        </span>thisContext receiver: #foo.</div>


<div><span style="white-space:pre-wrap">        </span>^ self</div><div><br></div><div>In workspace, evaluating:</div><div>1 to: 5 do: [:i | Transcript show: SomeClass new foo ]<br></div><div><br></div><div>Transcript result (with Cog):</div>


</div><div><div>foo</div><div>foo</div><div>a SomeClass</div><div>a SomeClass</div><div>a SomeClass</div></div><div><br></div><div>Transcript result (with Stack or Vanilla):</div><div><div>foo</div><div>foo</div>

<div>foo</div><div>foo</div><div>foo</div><div><br></div><div>Now as no one has ever complained, I guess this feature is not used.</div><div><br></div><div>As far as I know, the real use cases of the context seems to be:</div>


<div>- setting and gettings temporaries  </div><div>- setting and getting the sender of a context</div><div>- setting and getting the pc</div><div>- getting method, closureOrNil, receiver, stackp, arguments but NOT setting them</div>


</div><div><div><br></div><div>Now setting the sender of a context seems to be used only in two cases:</div><div>- continuations (as seaside continuations)</div><div>- exception implementation</div><div>

<br></div><div>So imagine that in the future you would have a context that can be accessed in read-only, where you could only:</div><div>- set the temporaries (but not arguments)</div><div>- set the pc (or something equivalent, as set the currently executed ast node)</div>


<div>- use continuations (exceptions can be implemented on top of continuations)</div><div><br></div><div>I would like to know if there are things that you do now and that you would not be able to do with a context like that. For non meta developer (like enterprise app developer) I guess it will not change anything, but I want to know if you implemented a framework as seaside, does it requires other things from the context and why ?</div>


<div><br></div><div>Thanks for answering,</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div>