Joe Marshall <jrm@ccs.neu.edu> wrote:
+---------------
| Pascal Costanza <costanza@web.de> writes:
| > ...so that an implementation of the language isn't actually required
| > to do extensive program analysis to determine all instances of tail
| > recursion. ...
|
| Right. It only needs to find the `obvious' ones.
+---------------
Specifically, it only needs to find the specific (sub)expressions
required by R5RS "3.5 Proper tail recursion":
<URL:http://www.schemers.org/Documents/Standards/R5RS/HTML/
r5rs-Z-H-6.html#%_sec_3.5>
Though as it says there, an implementation *may* do more:
Note: Implementations are allowed, but not required, to recognize
that some non-tail calls, such as the call to H above, can be
evaluated as though they were tail calls. In the example above,
the LET expression could be compiled as a tail call to H.
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607