this will be a newbie question.I read all mail but i wonder something.<br>can we say iteration instead of tail recursion.I dont know how to write a program with iteration in scheme <br>in java there are for,do while but someone said you can make loop in scheme.<br>
In tail recursive, program can be written by adding one extra parameter in scheme,in java.But logic is same in both tail recursion and iteration "not using stack (memory)". I mean using temprary value instead of using memory.If i make a mistake i am sorry.I am beginner on programming.<br>
<br>And why are we writing recursive program.There are some advantages on that ?<br>Let say we wrote factorial function with recursion and call it like factroail(50).Program stuck.If you use laptop,your machine warm up,may be other process on machine cannot be proceed for sometime.<br>
<br>But you wrote this program with tail recursive.Your calculation ends with two or three second.<br><br>So may be we prefer CPS.But both CPS and tail recursion is faster and freeofcost and not diffucult for machine.But recursive is opposite.Why do we still write program with recursive.<br>
<br>(your discussion is very advanced to me and i ask few question i try to improve myself i hope you are welcommed me)<br><br><br><div class="gmail_quote">On Sat, Apr 25, 2009 at 9:49 PM, Joe Marshall <span dir="ltr"><<a href="mailto:jmarshall@alum.mit.edu">jmarshall@alum.mit.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The word `call' itself is problematic because it implies a return.<br>
<div class="im"><br>
<br>
On Sat, Apr 25, 2009 at 11:42 AM, Shriram Krishnamurthi <<a href="mailto:sk@cs.brown.edu">sk@cs.brown.edu</a>> wrote:<br>
> It is dangerous to use the term "tail recursion" ever, unless you<br>
> really, really mean recursion in the very narrow sense by which the<br>
> doofus-in-the-street understands it, namely "a function that<br>
> *directly* calls itself".<br>
><br>
> I have seen an especially strong trend amongst MIT folks to use "tail<br>
> recursion" to refer to the general case of "a sequence of calls that<br>
> eventually result back in the same function, even if indirectly".<br>
> This is technically correct, and the meaning of this general phrase<br>
> may be obvious to all members of the very highly intelligent species<br>
> that populates MIT. But it confuses the doofus, and that's a problem,<br>
> because it leads to the sort of confusion in Guido's message and<br>
> ensuing discussion -- on a topic that needs less, not more, confusion.<br>
><br>
> [Tail calls that do not lead to recursion are still worth optimizing,<br>
> but they cannot lead to order-of-complexity increases in size except<br>
> in pathological cases, so they are not as interesting to focus on<br>
> because that, too, distracts the conversation.]<br>
><br>
> Shriram<br>
><br>
<br>
<br>
<br>
</div><font color="#888888">--<br>
~jrm<br>
</font><div><div></div><div class="h5">_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme" target="_blank">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br>
</div></div></blockquote></div><br>