<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 15, 2013 at 4:28 PM, gettimothy <span dir="ltr">&lt;<a href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><u></u><div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif">If you look at this (or attached, if it doesn&#39;t show up inline) picture  from Eliot Miranda&#39;s  <a href="http://www.mirandabanda.org/cogblog/category/cog/page/14/" target="_blank">Closure&#39;s Part I discussion</a> ,  the naive &lt;cough&gt; me &lt;/cough&gt; would spend two days wondering whey there are no senders.<br>
After all, its obvious that  <b>--sender: nil </b>means that there are no senders.<br></div></div></blockquote><div><br></div><div>Assuming you&#39;re not joking, that&#39;s not what it means at all.  The sender points to the sender context *until* it is returned from.  We&#39;re inspecting a block, which got created in the Doit context for the expression [:n| ....].  And that DoIt context is the home context of the [:n|...] block.  The DoIt context returned its result (the [:n|...] block) to whatever the sender context was.  But when the DoIt context returned that result the DoIt context&#39;s sender was nilled, to indicate that it had been returned from.  So by the time the [:n|...] block was inspected its home context&#39;s sender was nil.</div>
<div><br></div><div>Have you tried reading through the BlueBook&#39;s VM section?  That&#39;s an excellent presentation of the VM&#39;s operational semantics (its how I leaned).  The only problem is that it presents BlueBook blocks, not closures.  It would be great to rewrite it as a 32-bit closure VM -- when ever time allows ;-)</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif"><br><br><img><br>
<br><br>From Squeak By Example, page 55 in the discussion of pseudo-variables, &quot;<b>nil</b> is the unique instance of the class UndefinedObject&quot;.<br><br>Which makes perfect sense.<br><br>One of these days, I will get past paragraph 4 on this Closures Discussion, but boy, there are a lot of things going on under the hood there. (:<br>
<br>Thanks for your patience as I try to grok this stuff.<br><br>cheers.<br><br>tty.<br></div></div><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>