[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: following up on speed



Bruce Lewis wrote:

> IMO converting non-tail recursion to tail recursion was taught too early
> when I took SICP, and I suspect it still usually is.  

Only if you use SICP to teach this material.  A book that focuses on
program design rather than clever ways of coding solutions wouldn't
fall into this trap.

>							If the first 50
> non-tail recursive calls they see are supposed to be turned into tail
> calls, they'll think "convert to tail call" every time they see a
> non-tail call recursion after that.

You bet!

Shriram