is there any reason why smalltalk doesn't implement tail recursion optimization? Is by "language design"? 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"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>></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 <bert <at> <a href="http://freudenbergs.de" target="_blank">freudenbergs.de</a>> writes:<br>
<br>
><br>
> On 05.10.2011, at 00:24, nicolas cellier wrote:<br>
><br>
</div>snip... gmane is a tyrant<br>
<div class="im">><br>
> 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>
><br>
> I don't think it's possible to emulate whileTrue without reaching for the meta<br>
hammer. Interesting<br>
> discussion though. Maybe a bit over the head of the average newbie ;)<br>
><br>
> - Bert -<br>
><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>>sender:<br>
But the sport is becoming a bit crooked. And we're getting far from initial<br>
question.<br>
It'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>