<br><br><div class="gmail_quote">On Wed, Dec 9, 2009 at 10:36 AM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@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;">
2009/12/9 Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt;<br>
&gt;<br>
&gt; On Wed, Dec 9, 2009 at 9:15 AM, Colin Putney &lt;<a href="mailto:cputney@wiresong.ca">cputney@wiresong.ca</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 8-Dec-09, at 11:02 PM, Igor Stasenko wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; In this respect, interesting, how to avoid a pitfal of circular<br>
&gt;&gt;&gt; delegation.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; x -&gt; y -&gt; x<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; if i send a message to x, and got DNU, it is automatically delegated to<br>
&gt;&gt;&gt; y,<br>
&gt;&gt;&gt; but in same way as x could delegate to y, y could delegate to another<br>
&gt;&gt;&gt; object , and finally some of them<br>
&gt;&gt;&gt; in delegation chain could delegate back to x. Circle is closed, and VM<br>
&gt;&gt;&gt; will loop forever trying to lookup a method not implemented in any of<br>
&gt;&gt;&gt; objects in such delegation chain.<br>
&gt;&gt;<br>
&gt;&gt; Yup, that&#39;s certainly a possibility. The only remedy is &quot;don&#39;t do that.&quot;<br>
&gt;&gt; Consider it a bug, in the same way that we currently consider infinite<br>
&gt;&gt; recursion a bug.<br>
&gt;<br>
&gt; and if the concern is a loop in the VM&#39;s lookup then all it has to do is<br>
&gt; remember the object or class it started the lookup in and abort (go straight<br>
&gt; to sending DNU) if it meets the same one again.<br>
<br>
</div></div>Care to add it to Cog as a precaution against future hacks? :)<br></blockquote><div><br></div><div>Good suggestion.  &lt;scottish&gt;Now sends are faster this kind of check is much cheaper&lt;/scottish&gt; </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
&gt;&gt;<br>
&gt;&gt; Colin<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<font color="#888888"><br>
<br>
<br>
--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
<br>
</font></blockquote></div><br>