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