is there any reason why smalltalk doesn&#39;t implement tail recursion optimization? Is by &quot;language design&quot;? It tries to avoid any issue? <br><br>Thanks <br>Erlis <br><br><div class="gmail_quote">On Wed, Oct 5, 2011 at 1:50 PM, nicolas cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@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 class="im">Bert Freudenberg &lt;bert &lt;at&gt; <a href="http://freudenbergs.de" target="_blank">freudenbergs.de</a>&gt; writes:<br>


<br>
&gt;<br>
&gt; On 05.10.2011, at 00:24, nicolas cellier wrote:<br>
&gt;<br>
</div>snip... gmane is a tyrant<br>
<div class="im">&gt;<br>
&gt; Yes, but log(n) is still not good enough for loops that run forever. Like the<br>
Morphic main loop. Or the idle process.<br>
&gt;<br>
&gt; I don&#39;t think it&#39;s possible to emulate whileTrue without reaching for the meta<br>
hammer. Interesting<br>
&gt; discussion though. Maybe a bit over the head of the average newbie ;)<br>
&gt;<br>
&gt; - Bert -<br>
&gt;<br>
<br>
</div>Ah yes of course, this is the essential case... And we cannot even know if the<br>
loop is going to halt.<br>
For the two specific cases you submitted, we could cheat by using another VM<br>
magic and let the UI and idle process regenerate by forking themselves and<br>
completely ignore any synchronisation requirement.<br>
Or emulate tail call elimination by playing with thisContext&gt;&gt;sender:<br>
But the sport is becoming a bit crooked. And we&#39;re getting far from initial<br>
question.<br>
It&#39;s already something to know that a jump bytecode solves these problems<br>
efficiently.<br>
<font color="#888888"><br>
Nicolas<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br>