Re: Ugly loop

Cameron MacKinnon wrote:

> Should they be taught about the possibility that a given Lisp
> implementation may or may not optimize tail recursion? Absent
> guarantees, teaching Lisp recursion is teaching a non-portable
> technique, as code which runs fine in one Lisp may exhaust memory in
> another, and code which runs fine for small input may fail for large
> input, even though there's no obvious input size dependencies in the code.

They should be taught that a good compiler does employ tail
optimization, and that they should dump the rest that doesn't.